Skip to main content

what's the client jndi properties for looking up sessionbean?

1 reply [Last post]
testabc
Offline
Joined: 2006-02-25

We have ejb30 application which has sessionbean and entitybean, the application client is trying to use jndi.properties to lookup sessionbean, what's the default properties?

We use
DEFAULT_URL = "iiop://localhost:1050/"
CONTEXT_FACTORY = "com.sun.enterprise.naming.SerialInitContextFactory"
URL_PKG_PREFIXES = "com.sun.enterprise.naming"

By the way, 1050 is what kind of port?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ksak
Offline
Joined: 2005-05-20

We recommend that you not hardcode any properties in your stand-alone jva clients and instead use the no-arg InitialContext constructor. As long as appserv-rt.jar is in the classpath the correct naming provider will be bootstrapped.

If the cilent is running on a different machine than the server, you can set
-Dorg.omg.CORBA.ORBInitialHost= when starting the client JVM. This property defaults to localhost.

1050 is the default orb port on which the server's naming service is listening. If that port has a different value, you can set

-Dorg.omg.CORBA.ORBInitialPort=
when starting the client JVM.

--ken