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:
|