Posts

Worker Node – In Kubernetes Theory Points

Worker Node – In Kubernetes Overview  A worker node provides a running environment for client applications In Kubernetes the application containers are encapsulated in Pods, controlled by the cluster control plane agents Pod is the smallest scheduling work unit in Kubernetes.   in a multi-worker Kubernetes cluster, the network traffic is handled directly by the worker nodes, and is not routed through the control plane node. A worker node has the following components: Container Runtime  Node Agent -  kubelet Proxy -  kube-proxy Add-ons for DNS, dashboards, cluster-level monitoring and logging    1. Container Runtime  Kubernetes supports several container runtimes:  CRI-O : A lightweight container runtime for Kubernetes,  Containerd : A simple and portable container runtime.  Docker Engine : A popular and complex container platform which uses containerd as a container runtime. Mirantis Container Runtime :...

Spring MVC

Spring MVC Spring फ्रेमवर्क एम वी सी हा एक हेल्लो वल्ड एक्षम्प्ल 

Spring MVC BeanNameUrlHandlerMapping

================= What is Spring MVC BeanNameUrlHandlerMapping ================= This is the default mapping provided by spring. This is a bit similar to struts style. In this Spring MVC mapping , developer is allowed to specify URI and control for that url specifically. As shown below. WE have to specify mapping class first and then bean ids. <beans ... >   <bean class = "org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />   <bean name = "/welcome.htm" class = "com.bunty.anil.controller.WelcomeController" />   <bean name = "/college.htm" class = "com.spring.bunty.controller.StudentController" />   <bean name = "/x*.htm" class = "a.b.c.controller.CommonController" />   </beans>

Performance Tuning in Java

===== What all perfromance tuning tools you are aware ====== 1. JProbe is the good tool for all meamory leak related problems. Gives good graphical reports. 2. Jmeter is also good one. 3. Pluggins like PMD and FindBugs are there. 4. Java 5 itself provide its own console to do so that is jConsole

Threading in core Java

========== Synchronized block vs Synchronized method? When to use Synchronized block and when synchronized method? If method has only few lines to by synchronized which way will you prefer for synchronization? ======== if you go for synchronized block it will lock a specific object.   if you go for synchronized method it will lock all the objects.   If there is a separate class and has one method. You want to call that method with restricted access then use synchronized block. Else use synchronized method. Synchronized methods are used when we are sure all instance will work on the same set of data through the same function Synchronized block is used when we use code which we cannot modify ourselves like third party jars etc The object taken in the parantheses by the synchronized construct is called a monitor object. public class Counter{           long count = 0;     ...

Annotations in Java

Annotation in java ======== What are the advantages of Annotation? ======== As we are aware that every class is subclass of object. AnnotationOverrideTest ca object class has two overridden methods. But Object class does not have toStirng123() method. Here compiler will give an error. Which will save developer time as well as errors caused by human ignorance. public class AnnotationOverrideTest {       @Override public String toString() {       return "Override the toString() of the superclass";    }       // Compilation Error because superclass Object does not have this method    @Override public String toString123() {       return "Override the toString123() of the superclass";    } } If you look at below code, developer is trying to do some action on window close event. Program will easily compile and run, but will not work as ...

Struts Tag: Create Combobox using ArrayList of String

How to iterate ArrayList of String. Suppose you have an ArrayList which contains only String. Many times the situation comes that ArrayList contains object of EMP class. or object of City and Stage.  In this case iterating using logic:iterate is very easy. But if you want to iterate ArrayList of String then create combobox then it is difficult. -------------------------- -------------------------- ArrayList myArrayList = new ArrayList(); myArrayList.add("Anil"); myArrayList.add("Saurabh"); myArrayList.add("Eshwar"); myArrayList.add("Sudeepta"); In jsp you can following lines of struts tag library. <td align="left"> <b>Table Combobox</b>     <html:select styleId="tableName" property="tableName" value="aName" onchange="">                  <option value=''>Select Table</option>                 <html:options name="tableNameArra...