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 do you understand by j2ee?
What is full form of j2ee?
What do you mean by j2ee module?
What are the different types of events in java?
What is DDP?
What is the container?
What is java full stack developer?
Is j2ee a programming language?
What is difference between java and core?
Why java is a platform?
What is a web container j2ee?
What is a j2ee container?
In DAO we are writting sql queries , how it is possible with creating and closing database connections.
What does java ee stand for?
What is the difference between session bean and entity bean ?