Using JNDI to obtain bean references

Java Naming and Directory Interface (JNDI) defines an application programming interface (API) specified in the Java programming language that provides the naming and directory function to Java programs. It also defines a service provider interface (SPI) that allows various directory and naming service drivers to be plugged in.Figure 1 illustrates this by showing a Naming Manager interfacing with a Java application by means of the JNDI API, and with various Name servers via the JNDI SPI.

Figure 1. JNDI structure
This figure shows the JNDI Naming Manager and its interfaces to a Java application, and to various directory and naming service drivers. These are described in the text.

The JNDI API and the SPI are described in documents that are available from the Sun Microsystem's web site at http://www.javasoft.com/products/jndi/index.dital . An overview is available at http://www.javasoft.com/products/jndi/tutorial/getStarted/overview/index.dital .

After an enterprise bean has been registered in a name server by the administrator of the server system, using PERFORM CORBASERVER/DJAR PUBLISH, a client application can use the JNDI interface to locate its home interface.

To enable this, you must set up a suitable name server that supports the Java Naming and Directory Interface (JNDI) Version 1.2, and then define its location to CICS. This is described in Setting up an LDAP server and Setting up a COS Naming Directory Server, and for details of the JVM properties that are needed, see the CICS® System Definition Guide