Well.. just got in working myself, but I'm very new to all this so any gurus
feel free to correct...


In the same directory as your app drop a jndi.properties file in with the
following:

java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://localhost/appname                //change this
to your appname
java.naming.security.principal=admin
java.naming.security.credentials=123


and in your app..

import java.rmi.RemoteException;
import javax.ejb.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import com.evermind.server.rmi.*;
import xxx;           //<-import your class files for the bean here..


Context context = new InitialContext();
Object homeObject = context.lookup("beanName");
BeanHome beanHome = (BeanHome)PortableRemoteObject.narrow(homeObject,
BeanHome.class);

// from the home object do the create or find or whatever..
Bean bean = (Bean)PortableRemoteObject.narrow(beanHome.create(uniqueId),
Bean.class);




Hope that helps..


Tim









[EMAIL PROTECTED] on 13/11/2000 23:49:48

Please respond to Orion-Interest <[EMAIL PROTECTED]>
                                                              
                                                              
                                                              
  To:          Orion-Interest                                 
               <[EMAIL PROTECTED]>               
                                                              
  cc:          (bcc: Tim Clarke/Globebyte Limited UK)         
                                                              
                                                              
                                                              
  Subject      Application client.                            
  :                                                           
                                                              







Hi All,

I am trying to setup unit testing and I need to know how to make a client
application that connects to the Orion server.  Can someone explain either
how to do this manually or how to use the clientassembler.jar tool?  Also
do I need to distribute the orion.jar file with standalone client
applications?  Does the clientassembler create all of the necessary class
files (include stubs)?

Thanks in advance,
Ted Slusser






Reply via email to