|Oracle8i Enterprise JavaBeans and CORBA Developer's Guide
Clients use the Java Naming and Directory Interface (JNDI) interface to look up published objects in the session namespace. JNDI is an interface supplied by Sun Microsystems that gives the Java application developer a way to access name and directory services. In addition to the API used by the application developer, some of whose classes and methods are described in this section, there is also a JNDI Service Provider Interface (SPI). Oracle8i JServer has implemented a SPI to the OMG CosNaming service, which provides the access to the published object namespace.
This section discusses only those parts of the JNDI API that are needed to look up and activate published objects. To obtain a complete set of documentation for JNDI, see the web site URL that is listed in "For More Information".
When you use JNDI in your client or server object implementations, be sure to include the following import statements:
import javax.naming.Context; // the JNDI Context interface import javax.naming.InitialContext; import oracle.aurora.jndi.sess_iiop.ServiceCtx; // JNDI property constants import java.util.Hashtable; // hashtable for the initial context environment
in each source file.
It is also possible to access the session namespace without using JNDI. See "Non-JNDI Clients" for a Java example that does not use JNDI.
Context is an interface in the
javax.naming package. All Oracle8i EJB and CORBA clients that use JNDI methods to lookup and activate server objects must import this interface.
javax.naming.Context interface forms the basis for the JNDI operations that you use to manage services and sessions in the Oracle8i ORB. This class is fully documented in the standard JNDI JavaDoc from Sun Microsystems. See "For More Information" for information on how to obtain this documentation.
This section documents only the
Context variables and methods that are most frequently used in Oracle8i CORBA and EJB application development.