|
Page Created :
OPENEJB :
Remote Server
Remote Server has been created by David Blevins (Sep 02, 2005). Content:Accessing EJBs RemotelyWhen using OpenEJB as a stand-alone server you can connect across a network and access EJBs from a remote client. The client code for accessing an EJB's Remote Interface is the same, however to actually connect across a network to the server, you need to specify different JNDI parameters. Short versionUsing OpenEJB's default remote server implementation is pretty straight forward. You simply need to:
So, here it is in short. Deploy your bean with the Deploy Tool:
See the Deploy Tool documentation for more details on deploying beans. Start the server:
See the Remote Server command-line guide for more details on starting the Remote Server. Create an initial context in your client as such: Properties p = new Properties(); p.put("java.naming.factory.initial", "org.openejb.client.RemoteInitialContextFactory"); p.put("java.naming.provider.url", "25.14.3.92:4201"); p.put("java.naming.security.principal", "myuser"); p.put("java.naming.security.credentials", "mypass"); InitialContext ctx = new InitialContext(p);
In OpenEJB 1.0 beta 1, add the following libraries to your clients classpath:
Both can be found in the lib directory where you installed OpenEJB. |
Unsubscribe or edit your notifications preferences
