Java Naming and Directory Interface (JNDI) API

Naming and directory services have evolved over the years. Server-side components once used different naming and directory services to share their functionality. This meant that a client application that required the use of server-side application components registered with different naming services had to include the proprietary code of each naming service. The Java Naming and Directory Interface (JNDI) attempts to bring about the unification of disparate naming and directory services by using a common and consistent API called the JNDI API. The implementation of the JNDI API is integral to using and accessing database connections, message queues, EJBs, and so on.

As a part of the process for defining standards for naming and directory services, the JNDI API defines common interfaces to enable application components to access naming and directory services from different vendors. Hence, the JNDI specification defines two sets of APIs: the JNDI API and the JNDI SPI. The JNDI API is what application component providers deal with, the Application Programming Interface. The JNDI SPI (Service Provider Interface) consists of interfaces that vendors of naming and directory services implement to make their naming and directory services compliant and accessible using the JNDI API.

The JNDI architecture consists of four layers:

  • Vendor-specific naming and directory services The lowest layer of the JNDI architecture consists of the vendor-specific naming and directory services.

  • JNDI SPI The JNDI SPI is the lowest layer that directly interacts with the naming and directory services. To enable access to the naming and directory services using JNDI, each of the service providers implements the JNDI SPI.

  • NamingManager and DirectoryManager Because the JNDI SPI layer is a vendor-specific implementation, an intermediate layer is required to perform the transformation between the JNDI SPI and JNDI API layers. The NamingManager and DirectoryManager classes perform the interaction between the JNDI SPI layer and the JNDI API layer.

  • JNDI API The final layer, used by server components as well as client applications and components, is the JNDI API layer. The JNDI API layer exposes a common and standard mechanism for accessing and using naming and directory services.



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net