May 2001
Intermediate to advanced
1088 pages
30h 13m
English
The Context class is the core of the JNDI API. You use it to perform any lookup and to add any new name-value associations. When you use JNDI, you typically create an InitialContext object first:
Context ctx = new InitialContext();
The InitialContext constructor looks for a system property called java.naming.factory. initial that contains the name of the class that creates the InitialContext. Sometimes, you must supply this value yourself. Some EJB containers, like the one that comes with Sun's J2EE SDK, already have this property set.
JDK 1.3 comes with three built-in service providers: RMI, CORBA, and LDAP. The classnames for the different initial context factories are
com.sun.jndi.rmi.registry.RegistryContextFactory com.sun.jndi.cosnaming.CNCtxFactory ...
Read now
Unlock full access