is it possible to create single instance of java class per
session in web application
Answer Posted / nirmal
The easiest way is to use RMI to start the app and check to
see if it's already running.
The basic structure is this:
The main method of your app checks the RMI registry to see
if the app is started. If so, exit.
Otherwise, the main creates an instance of the app (which
is a remote object) and registers it in the RMI registry.
The class' constructor creates the GUI and displays it.
Alternatively, you could create a "start" method that you
call via RMI to start the app.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Is j2ee a framework?
What is event in java?
What is containers in java?
What is a web container j2ee?
What do you understand by j2ee?
What does j2ee stand for?
Is class a data type in java?
What is jlayeredpane java?
What is jbutton in java?
What is j2ee api?
What are the advantages of object-relational mapping (orm)?
Is java more difficult than c++?
What are the advantages in the use of spring for application development?
Is object a composite data type in java?
What are container services?