JNDI Resources
TheJava Naming and Directory Interface (JNDI) is an application programming interface
(API)for accessing dierent kinds of naming and directory services. Java EE components locate
objectsby invoking the JNDI lookup method.
JNDIis the acronym for the Java Naming and Directory Interface API. By making calls to this
API,applications locate resources and other program objects. A resource is a program object
thatprovides connections to systems, such as database servers and messaging systems. (A JDBC
resourceis sometimes referred to as a data source.) Each resource object is identied by a
unique,people-friendly name, called the JNDI name. A resource object and its JNDI name are
boundtogether by the naming and directory service, which is included with the Enterprise
Server.To create a new resource, a new name-object binding is entered into the JNDI.
Thissection covers the following topics:
“JavaEE Naming Services” on page 77
“NamingReferences and Binding Information” on page 78
“UsingCustom Resources” on page 79
“UsingExternal JNDI Repositories and Resources” on page 79

JavaEE Naming S ervices

AJNDI name is a people-friendly name for an object. These names are bound to their objects by
thenaming and directory service that is provided by a Java EE server. Because Java EE
componentsaccess this service through the JNDI API, the object usually uses its JNDI name.
Whenit starts up, the Enterprise Server reads information from the conguration le and
automaticallyadds JNDI database names to the name space.
JavaEE application clients, enterprise beans, and web components are required to have access
toa JNDI naming environment.
Theapplication component's naming environment is a mechanism that allows customization
ofthe application component's business logic during deployment or assembly. Use of the
6
CHAPTER 6
77