You have to get hold of the Orion's context....

For that you'll have to include orion.jar,jndi.ar,ejb.jar in ur command line
classpath when executing the client in a seperate JVM.

My Client code is:-----

 Context ctx = new InitialContext();
 Object objref = ctx.lookup("Hello");  (Hello is the <ejb-name> of the
enterprise bean in the ejb-xml.jar file)
 HelloHome hellohome = (HelloHome)PortableRemoteObject.narrow(objref,
HelloHome.class);
Hello helloEx = hellohome.create();

My jndi.properties file is:------

java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://localhost/hello  ( Replace hello by the name
of ur applicatioin you have given in server.xml)

java.naming.security.principal=admin
java.naming.security.credentials=123 ( replace 123 by the password you have
given for the admin.)

Keep the jndi.properties file in the directory from where you are running ur
client, if it is in a seperate JVM...

Hope this helps......



----- Original Message -----
From: Ray <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Sunday, August 13, 2000 5:30 AM
Subject: Creating a JNDI entry


> Hello ....
>
> I'm trying to access an EJB through RMI.
>
> I can get hold of the context, but I'm not sure how to assign the bean a
> JNDI entry under Orion.
>
> Could someone tell me how this is done?
>
> Thanks
>
>
>


Reply via email to