JNDI

1.  JNDI provides a platform-independent Java interface to naming and directory services, such as LDAP, NDS, and Active Directory.
2.  JNDI makes it possible for developers to create portable applications that are enabled for a number of different naming and directory services. 


The Java Naming and Directory Interface (JNDI) is an application programming interface (API) for accessing different kinds of naming and directory services. JNDI is not specific to a particular naming or directory service, it can be used to access many different kinds of systems including file systems; distributed objects systems like CORBA, Java RMI, and EJB; and directory services like LDAP.


JNDI is the Java Naming and Directory Interface. It's used to separate the concerns of the application developer and the application deployer.


To access an enterprise resource such as a data source or JavaMail session in a distributed computing environment, you can use the JNDI API to locate that object so that you can use it in your code. To do this, you must first obtain the initial context that contains the resource (a Java object).