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 a component in java?
What is difference between java and core?
Describe orm?
Is a relationship java?
What is web container in j2ee?
How many types of objects are there in java?
What is java technology stack?
What is callback methods?
What is wildfly java?
How does j2ee application work?
What is ear file?
What is j2ee tutorial?
What is java ee used for?
How do you run a java program?
What is application assembler?