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


Please Help Members By Posting Answers For Below Questions

What do you understand by actionform?

484


Can I run seam in a j2ee environment?

491


Is java ee and j2ee same?

497


J2ee is a container centric architecture. Explain.

518


i want test pattern of zylog company and some examples also

2294






What is java j2ee developer?

469


Why java is interpreted language?

457


What is repaint in java?

504


What is event and listener in java?

426


What is platform independent in java?

516


What does java awt stand for?

524


What is java secure socket extension (jsse)?

513


What is j2ee architecture?

481


What software is needed for java programming?

458


What are the components of the java platform?

476