interesting, I connect to a remote server all the time using my clients. I
just set up a jndi.properties file, but it would be similar to your setup.
About the only thing I see is the /stamp after your remoteserver. I have
never had anything after the ormi://remoteserver, Doing all the lookup in
the jndi context. (I assume stamp is a subcontext you are looking in)
thus if I had a bean (thisHome) that i bound to context stamp/myHomeObject I
would go about it this way.... (using your env.....
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialC
ontextFactory");
env.put(Context.PROVIDER_URL,"ormi://remoteserver");
env.put(Context.SECURITY_PRINCIPAL,"admin");
env.put(Context.SECURITY_CREDENTIALS,"123");
context = new InitialContext(env);
thisHome home;
home = (thisHome)
PortableRemoteObject.narrow(context.lookup("stamp/myHomeObject"),
thisHome.class);
and so on... maybe I am totally missing what you want to do though. :)
Al
----- Original Message -----
From: "James Ho" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Sunday, October 08, 2000 3:10 AM
Subject: How does orionconsole do it?? (remote EJBs)
> Hi everyone,
>
> I am currently trying to access an remote EJB from a servlet. I had
> this, in my code..
>
>
>
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialC
ontextFactory");
> env.put(Context.PROVIDER_URL,"orim://remoteserver/stamp");
> env.put(Context.SECURITY_PRINCIPAL,"admin");
> env.put(Context.SECURITY_CREDENTIALS,"123");
> context = new InitialContext(env);
>
> When I tried to lookup the EJB, it kept on saying 'domain was null'.
> WHat happened was that it actually tried to look for 'stamp' in the
> local orion server (and of course failed).
>
> What I wanted to do, is basically like orionconsole.jar, let u add a
> server in, and then search the EJBs on the server, and mine is
> web-based. How does orionconsole do it? How come the orion console
> doesn't need the remote EJBs' home/remote interface?? I have been
> having a lot of problem with servlets accessing remote EJBs.. :(
>
> Any help much appreciated.
>
> Thanks heaps...
>
> Regards, James.
>