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
for example we are login into the irctc server from there it will go to the selected bank and deduct amount and come back to the irctc. so if we are developing this in java means will it be run on the same session. but as per my knowledge bank is separate and irctc is separate URL's so it will use two different sessions then how it is maintaining same session through out application and even it uses the payment gateway? how it is working can any one help me on that??
Define thin client?
Is core java and j2se same?
What do you understand by connector?
In DAO we are writting sql queries , how it is possible with creating and closing database connections.
Why is java called technology?
What is use of final keyword in java?
What are container services?
What is element?
What are the j2ee technologies?
Difference between save and saveorupdate?
What is declaration?
Define orm and its working in j2ee?
How does event listener work in java?
What is java secure socket extension (jsse)?