![]() ![]() ![]() ![]() |
Contents |
The JavaTM Naming and Directory InterfaceTM (JNDI) is an API that provides naming and directory functionality to applications written in the Java programming language. The JNDI is defined to be independent of any specific directory service implementation. Thus, a variety of directories--new, emerging, and already deployed ones--can be accessed in a common way.
Architecture
The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface). Java applications use the JNDI API to access a variety of naming and directory services. The JNDI SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application using the JNDI API to access their services.Packaging
The JNDI is included in the Java 2 SDK, v 1.3. It is also available as a Java Standard Extension for use with the JDK 1.1 and the Java 2 SDK, v 1.2. It extends the 1.1 and 1.2 platforms to provide naming and directory functionality.In order to use the JNDI, you must have the JNDI classes and one or more service providers. The Java 2 SDK, v 1.3 includes three service providers for the following naming/directory services:
- Lightweight Directory Access Protocol (LDAP)
- CORBA services (COS) naming service
- Java Remote Method Invocation (RMI) Registry
Other service providers can be downloaded from the JNDI Web site or obtained from other vendors.
When using the JNDI as a Standard Extension on the JDK 1.1 and Java 2 SDK v 1.2, you must first download the JNDI classes and one or more service providers.
See the Preparations
lesson for details on how to install the JNDI classes and service providers.
The JNDI is divided into five packages:
![]() ![]() ![]() ![]() |
Contents |