What is "jndi"

The JNDI or Java Naming and Directory Interface is an API for accessing directory services. It allows client applications discover and obtain data or objects through a name. Like all Java Apis, it is platform independent. Additionally, it specifies a service interface (SPI), which allows directory service software to support your framework. The directory can be based on network, files or database, being only a matter of choice of product provider.

The JNDI API is used in Java applications that access external resources, such as databases, queues or JMS topics, and Javaee components. System administrators save objects administered to a directory service provided by the application server (usually) ; the application searches for these objects through JNDI (lookup). The API provides:

  • a mechanism to link an object to a name;
  • a standardized object search interface in the directory service;
  • an event interface that allows a user to know when an input (name + object) has been modified;
  • extensions that support the capabilities of the LDAP standard.