users@glassfish.java.net

Standalone Application Client

From: <glassfish_at_javadesktop.org>
Date: Thu, 26 Feb 2009 08:28:03 PST

I have a stand-alone application client that makes session bean calls on a remote server. I set up org.omg.CORBA.ORBInitialHost and org.omg.CORBA.ORBIntialPort as system properties and then instantiate an InitialContext using the no-arg constructor.

So far, so good.

This client also needs to be able to "disconnect" from one server and then start calling session beans from another server. I've been trying to do this by calling close() on the IntialContext object, resetting the host and port system variables and then instantiating a new InitialContext. Unfortunately, I find that the application keeps using session beans from the first server or that certain session beans do not work correctly.

Does anyone know a good way to "reset" the InitialContext on a stand alone application short of restarting the program?
[Message sent by forum member 'snewbold' (snewbold)]

http://forums.java.net/jive/thread.jspa?messageID=334031