Tech > InitialContext

Typical Values for J2EE Initial Context

Platform                                     INITIAL_CONTEXT_FACTORY                              PROVIDER_URL                                   URL_PKG_PREFIXES                           Comment
-------------------------------------------- ---------------------------------------------------- ---------------------------------------------- ------------------------------------------ -----------
JBoss  3.0.7                                 org.jnp.interfaces.NamingContextFactory              jnp://host:1099                                org.jboss.naming:org.jnp.interfaces
JRun 4.0                                     jrun.naming.JRunContextFactory                       host:2909
Sun One 7.0                                  com.sun.jndi.cosnaming.CNCtxFactory                  iiop://host:3700
Weblogic 7.0                                 weblogic.jndi.WLInitialContextFactory                t3://host:7001
WebSphere 5.0                          iiop://host:2809/                              Note: See note in "WebSphere" section
WebSphere 5.0 alternate                corbaloc:iiop:host:2809                        e.g. corbaloc:iiop:
WebSphere 5.0 multiple addresses       corbaloc::host1:2809,:host2:2809,:host3:2809
WebSphere 5.0 from non-WebSphere environment com.someone.else.naming.AnotherInitialContextFactory corbaname:iiop:host:2809/NameServiceServerRoot examples

Make sure intended file is the first one to be found on the classpath. Default versions are very likely to be in jar files on your classpath.




WebSphere Note: You probably need to use a host name rather than an IP address. Whilst you can use an IP address to hit the server, somewhere along the line the client seems to retrieve and attempt to use the host name from the name server. I guess you need to either alter the name server configuration to use IP address or change your client environment so that it can resolve the host name. (Update DNS entry, or add to you hosts file).

To see what port WebSphere Application Server 5 is listening on, go to the adminstrative console and select 'Application Servers -> server1 -> End Points -> BOOTSTRAP_ADDRESS'.


As at the time of writing, it is not possible to directly access Tomcat's JNDI properties from outside of Tomcat.

-- Frank Dean - 28 Feb 2008

-- Frank Dean - 02 Sep 2003

Related Topics: DevelopmentSetup, JbossHintsAndTips, WebSphere