Hi Elephantwalker, thank you very much for taking the time to reply to me.
I cut & pasted your code into my class, and ran it. I am sorry to say that the change in the code does not have any obvious effect (we have actually tried this solution earlier). What happens if I write wrong credentials, is that I get a stack trace, the program writes the message, then immediately the other stack trace appears and that's it. The login box does not reappear. But if this works in your enviroment and not in ours, surely something, somewhere must be different between our enviroments? Could it possibly be some server setting? ***************************** D:\client>testconnect java.lang.SecurityException: Invalid username/password for appit (yo) at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._np(Unknown Source) at com.evermind._ce._np(Unknown Source) at com.evermind.server.rmi.RMIContext.lookup(Unknown Source) at com.evermind.server.administration.LazyResourceFinder._np(Unknown Source) at com.evermind.server.administration.LazyResourceFinder.getEJBHome(Unknown Source) at com.evermind._ck._ho(Unknown Source) at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (Unknown Source) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.<init>(Unknown Source) at com.telenor.mobil.planit.appit.test.ContextTest.connect(ContextTest.java:29) at com.telenor.mobil.planit.appit.test.ContextTest.main(ContextTest.java:35) Once more unto the breach... java.lang.SecurityException: Invalid username/password for appit (yo) at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._np(Unknown Source) at com.evermind._ce._np(Unknown Source) at com.evermind.server.rmi.RMIContext.lookup(Unknown Source) at com.evermind.server.administration.LazyResourceFinder._np(Unknown Source) at com.evermind.server.administration.LazyResourceFinder.getEJBHome(Unknown Source) at com.evermind._ck._ho(Unknown Source) at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (Unknown Source) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.<init>(Unknown Source) at com.telenor.mobil.planit.appit.test.ContextTest.connect(ContextTest.java:29) at com.telenor.mobil.planit.appit.test.ContextTest.main(ContextTest.java:37) ***************************** D:\client>java -version java version "1.3.1" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24) Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode) ***************************** D:\client>java -jar orion.jar -version Orion/1.5.2 (build 10460) ***************************** D:\client>type testconnect.bat java -classpath .;orion.jar com.telenor.mobil.planit.appit.test.ContextTest ***************************** yours, Christian. -----Original Message----- From: The elephantwalker [mailto:[EMAIL PROTECTED]] Sent: 5. oktober 2001 11:21 To: [EMAIL PROTECTED] Subject: FW: Why can't orion respond to their customers? (was RE: FW: Logging in to server twice does not work.) Christian, Just in case the list server is down...your double login is not a bug. You left out a the dedicated.connection=true from your code, see below. Regards, the elephantwalker www.elephantwalker.com -----Original Message----- From: The elephantwalker [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 2:18 AM To: Orion-Interest Subject: RE: Why can't orion respond to their customers? (was RE: FW: Logging in to server twice does not work.) Yash and Christian, Obviously this works, because the OrionConsole app uses ormi, and if you put in the wrong password, you just remove the server, and add a server with the right password. They are a little clunky with the interface...but adding the wrong password doesn't prevent you from connecting. So lets look at your code. It looks like you left out one important bit in the properties. The dedicated.connection should be true. With the code below, you won't have to restart your server. Regards, the elephantwalker www.elephantwalker.com So here is the code: import javax.naming.*; import java.util.*; /** * InitialContext reconnection test. * @author Christian Tellefsen */ // Make sure you: // a) Have a META-INF/application-client.xml in the right place. // b) Replace the server name below. public class ContextTest { static void connect() { Hashtable env = new Hashtable(); env.put("dedicated.connection","true"); // <--- this makes it work! env.put( "java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory"); env.put( "java.naming.provider.url", "ormi://localhost/appit"); // replace with your server try{ // This will show the login box the first time, // but not the second time. new InitialContext(env); } catch(Exception e) {e.printStackTrace();} } public static void main(String[] s) { connect(); System.out.println("Once more unto the breach..."); connect(); } } -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Yashasree Sent: Thursday, October 04, 2001 10:48 PM To: Orion-Interest Cc: Orion-Interest Subject: Re: Why can't orion respond to their customers? (was RE: FW: Logging in to server twice does not work.) Hi Christian. We r in the same boat at u were and suffer from the same problem of logging in to the server twice not working. Did u find any workaround? Or did the orion guys respond Awaiting eagerly for a positive response Thanks in advance Yash ----- Original Message ----- From: <[EMAIL PROTECTED]> To: Orion-Interest <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 8:52 PM Subject: Why can't orion respond to their customers? (was RE: FW: Logging in to server twice does not work.) > My God, this is frustrating. > > I have tried reporting the bug in bugzilla. > I have tried mailing to the list. > I have tried mailing Orion directly. > > All I have received from Orion is complete and utter silence. I have not > even gotten a reply saying that the matter is being looked at, or even that > my mail has been received. If I had gotten any respnse at all I would not > have said this publicly, but since you refuse to acknowledge my mails, I > have to ask: > > Why do you not take your paying customers seriously? Your support is > extremely bad. We have production systems running on your server, and we > need to know when the bugs will be fixed. > > yours > Christian. > > Does anyone have any email address the Orion guys will respond to? > > -----Original Message----- > From: Mike Weissman [mailto:[EMAIL PROTECTED]] > Sent: 8. august 2001 15:34 > To: Orion-Interest > Subject: Re: FW: Logging in to server twice does not work. > > > Christian, > > We never found a way around this, we run from an applet. we were able > to use the RMIContextfactory and have repeated login attempts. We have > also abandoned rmi lookups due to performance and are going towards a > messaging paradigm for communication. > mike > > [EMAIL PROTECTED] wrote: > > > > In think the message was lost again, trying one more time. Sorry for the > > repost... > > > > > Does anyone know how to login again when the first attempt fails? > > > > > > Logging in twice seems to be impossible. How to reproduce: > > > > > > import javax.naming.*; > > > import java.util.*; > > > > > > /** > > > * InitialContext reconnection test. > > > * @author Christian Tellefsen > > > */ > > > > > > // Make sure you: > > > // a) Have a META-INF/application-client.xml in the right place. > > > // b) Replace the server name below. > > > > > > public class ContextTest { > > > static void connect() { > > > Hashtable env = new Hashtable(); > > > env.put( > > > "java.naming.factory.initial", > > > > "com.evermind.server.ApplicationClientInitialContextFactory"); > > > env.put( > > > "java.naming.provider.url", > > > "ormi://localhost/appit"); // replace with your server > > > try{ > > > // This will show the login box the first time, > > > // but not the second time. > > > new InitialContext(env); > > > } > > > catch(Exception e) {e.printStackTrace();} > > > } > > > > > > public static void main(String[] s) { > > > connect(); > > > System.out.println("Once more unto the breach..."); > > > connect(); > > > } > > > } > > > > > > Obviously I would like the login box to appear again. I cannot find any > > > way to tell the server to replace the old principal and credential. I > feel > > > weird telling my users that sorry, if you enter the wrong password you > > > have to restart the program. Obviously this is a showstopper. > > > > > > I see that other people have asked the same question, but no answers. I > am > > > also reporting this as a bug (#577) in bugzilla. > > > > > > Any help or workarounds would be greatly appreciated. > > > > > > yours > > > Christian Tellefsen > > > > > -- > ############################################################## > Michael Weissman e-mail: [EMAIL PROTECTED] > Clarent Corporation 303-734-5003 Fax 303-734-4244 > 1221 W. Mineral Ave. Littleton, Co 80120 > In the land of the dark, the ship of the sun is > drawn by the grateful dead -- Egyptian Book of the Dead > ##############################################################