JNDI (Java Naming and Directory Interface)
In short, JNDI is a directory/lookup API to register and locate services such as data sources and EJBs. It can interface directory implementations such as LDAP, CORBA, and ADSI.
Note JNDI is an API, not a protocol. In example, when accessing a registry operated by JBoss you need to tell the JNDI API which JNDI implementation (that of JBoss) to use by setting certain parameters when obtaining the initial context (which, in essence is the implementation). Using LDAP as the underlying directory works the same way (you'll need a JNDI API for LDAP).
For programmers: To tell JNDI what implementation to use, hand over the intial context factory and the provider URL as properties to new InitialContext(properties).
|