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
>