JNDI (Java Naming and Directory Interface)

JNDI (Java Naming and Directory Interface) enables Java platform-based applications to access multiple naming and directory services. Part of the Java Enterprise application programming interface (API) set, JNDI makes it possible for developers to create portable applications that are enabled for a number of different naming and directory services, including: file systems; directory services such as Lightweight Directory Access Protocol (LDAP), Novell Directory Services, and Network Information System (NIS); and distributed object systems such as the Common Object Request Broker Architecture (CORBA), Java Remote Method Invocation (RMI), and Enterprise JavaBeans (EJB).

As an illustration of what JNDI does, Todd Sundsted (in a JavaWorld article, JNDI overview, Part 1: An introduction to naming services) uses the analogy of a library's file system. Sundsted says that JNDI organizes and locates components within a distributed computing environment similarly to the way that card catalogs (and increasingly computer applications) organize and represent the locations of books within a library. A distributed application needs a means of locating components in the same way that the library patron needs a means of locating the book: just rummaging around inside a library - or an application - is not an efficient way to find a particular object. JNDI makes it possible for application components to find each other. Because different naming and directory service providers can be seamlessly connected through the API, Java applications using it can be easily integrated into various environments and coexist with legacy applications. The current version, JNDI 1.2, was specified with input from Netscape, Novell, Tarantella, Sun, and BEA. JNDI is considered an industry standard.

This was last updated in September 2005

Continue Reading About JNDI (Java Naming and Directory Interface)

Dig Deeper on Java platform tools and technology