Describe how to implement singleton design pattern in struts
Describe how to implement singleton design pattern in struts.- A singleton design pattern implementation is done using action class in struts framework.
- It performs as a front controller and every request goes through it.
- Also, the logging mechanism is easier.
- This can be achieved without authoring Log4j class over and over in each and every servlet.
- The singleton pattern restricts the instantiation of a class and ensures that only one instance of a class exists the java virtual machine.
- It provides global access point to the instance of the class.
- It is used for logging, driver objects, caching and thread pool.
|
Difference between >> and >>> - JavaThe >> is right shift operator. It shifts bits towards right. For example: 5 >> 1 returns 2. It shifts one bit towards right and one bit is lost...
What is an Anonynous inner class? - JavaAnonymous Inner Classes - An inner class without a name. It allows the declaration of the class, creation of the object and execution of the methods in it at one shot...