Any J2EE compliant application server, such as the WebLogic Server, has a JNDI subsystem. The JNDI subsystem is used in an Application Server as a directory for such objects as resource managers and Enterprise JavaBeans (EJBs). Objects managed by the WebLogic container have default environments for getting the JNDI InitialContext loaded when they use the default InitialContext() constructor. For a Collaboration using a WebLogic EJB Object Type Definition (OTD) to find the home interface of an EJB, the JNDI properties must be configured and associated with the OTD. However, for other external clients, accessing the WebLogic naming service requires a Java client program that sets up the appropriate JNDI environment when creating the JNDI Initial Context.
There are essentially two environments that have to be configured, Context.PROVIDER_URL and Context.INITIAL_CONTEXT_FACTORY.
For WebLogic, the Context.PROVIDER_URL environment is
t3://<wlserverhost>:<port>/
where,
<wlserverhost> is the hostname on which the WebLogic Server instance is running
<port> is the port at which the Webserver instance is listening for connections
For example,
t3://localhost:7001/
The initial context factory class for the WebLogic JNDI is weblogic.jndi.WLInitialContextFactory. This class should be supplied to the Context.INITIAL_CONTEXT_FACTORY environment property when constructing the initial context. The overloaded InitialContext(Map) constructor must be used in this case.