|
| |
- Copy the client class jar and the j2ee.jar file to the
WEB-INF/classes directory of your web application.
- Add the following to your web application configuration in the
resin.conf file:
<classpath id='WEB-INF/classes/j2ee.jar'/>
<classpath id='WEB-INF/classes/{your client class jar}'/>
|
- In your class, explicitly create the environment for the
InitialContext:
Hashtable vEnv = new Hashtable();
vEnv.put("org.omg.CORBA.ORBInitialHost",
"{your server host}");
vEnv.put("org.omg.CORBA.ORBInitialPort",
"{your server port}");
vEnv.put("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
|
Or create a jndi-link :
<jndi-link>
<jndi-name>java:comp/env/ejb</jndi-name>
<jndi-factory>com.sun.enterprise.naming.SerialInitContextFactory</jndi-factory>
<init-param org.omg.CORBA.ORBInitialHost="{your server host}"/>
<init-param org.omg.CORBA.ORBInitialPort="{your server port}"/>
</jndi-link>
|
- Make sure the InitialContext is initialised using the environment
set above. Then access the bean as usual:
InitialContext vContext = new InitialContext(vEnv);
Object vObjRef = vContext.lookup("{your bean jndi name}");
|
Copyright © 1998-2006 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc. | |
|