Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java I Java Naming and Directory Interface (JNDI)

Related Tutorials


 
 

Share on Google+Share on Google+

Java Naming and Directory Interface (JNDI)

Advertisement
The Java Naming and Directory Interface (JNDI) is a directory service based API to allow the clients to discover and lookup data and objects via a name.

Java Naming and Directory Interface (JNDI)

     


The Java Naming and Directory Interface (JNDI) is a directory service based API to allow the clients to discover and lookup data and objects via a name. JNDI is independent of the underlying implementation similar to all Java APIs that interface with host systems. Moreover, it indicates a service provider interface (SPI) that allows directory service implementations plugged into the framework. Vendor is free to choose either for a server or for a flat file or for a database for implementation.

RMI and Java EE uses the JNDI API to lookup the objects in a network. E.g. Jini does not use the JNDI API and has its own lookup service. 

The API provides:

  • a mechanism that binds up an object with a name.
  • a directory lookup interface to allow general queries
  • an event interface to allow clients that determines when directory entries have been modified
  • LDAP extensions of an LDAP service for supporting additional capabilities.

The SPI portion supports any kind of practical naming or directory services including:

JNDI hierarchally organizes its name, these name can be any string type like "com.mydomain.ejb.MyBean" or it can also be object name that supports the Name interface, but string is the most common way to naming an object. An object is associated with a name in the directory either by storing the object or a reference to the object in the directory service identified by the name.

The JNDI API defines a context indicating the location to look for an object. The initial context is mainly used as a starting point.

 

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 18, 2008

Related Tutorials

Discuss: Java Naming and Directory Interface (JNDI)  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
Md.Akber
June 17, 2011
JAVA

Iam a basic learner of java...
DMCA.com