is it possible to create single instance of java class per
session in web application
Answer Posted / savar33
Hi guys
the singleton solution will not work, since several nodes
are possible in the cluster, each node has it's own java.
Those singleton can be instanciated in each class.
Beside this the presented implementation of singleton design
pattern is improper. You should override constructor in this
way :
private Singleton(){};
I also would make getInstance() method synchronized. This is
multithreaded environment.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is java actionlistener?
What is architecture neutral in java?
What is the ear file?
What is document root?
What is a jbutton in java?
Are java primitives objects?
What is application client?
What are container services?
What is j2ee stack?
What is japplet in java?
Which package is imported by default in java?
What is frame in java?
What is awt package in java?
Is java important for my computer?
What is jaxr client?