Skip to Content
Former Member
Apr 20, 2006 at 12:37 PM

context lookup on specific server



On the portal, I'm interested to find out, who is loged in at the moment. For this I use the following.


Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY, "");

env.put(Context.PROVIDER_URL, "myserver:50004");

env.put("force_remote", "true");

env.put(InitialContext.SECURITY_PRINCIPAL, "user");

env.put(InitialContext.SECURITY_CREDENTIALS, "pw");

ctx = new InitialContext(env); security = (RemoteSecurity_Stub) ctx.lookup("remotesecurity");

RemoteSecuritySessions rss = security.getSecuritySessions();


This works to geht the sessions from the instances server and from the server of an other instance.

Now my problem. I have 2 servers per instance. This code connects only to one server of any instance. Is there any parameter I can set for the context to get on server0 or on server1? Or do I have no chance because this will always connect to the java dispatcher an therefore I won't be able to get the server I want? Perhaps anybody has a helpful idea?!

Best regards an thanks for help,