JNDI administered objects

JNDI (Java Naming and Directory Interface) is a standard Java extension that provides a uniform API for accessing a variety of directory and naming services.

JMS clients use JNDI to browse a naming service in order to obtain references to administered objects. Administered objects are JMS connection factory and JMS destination objects, where JMS destination objects are topics and queues. Administered objects are created and configured by a system administrator.

To create and configure JNDI administered objects, refer to the JMS provider documentation. If you are using the WebSphere MQ JMS provider, see the sample JMSAdmin definitions file that is included with WebSphere MQ and refer to the WebSphere MQ Using Java book.

Location of JNDI administered objects

JNDI administered objects are stored in the bindings. This can be either file system based or LDAP based. LDAP (Lightweight Directory Access Protocol) is a software protocol that enables anyone to locate organizations, individuals, and other resources; for example, locating files and devices in a network, either on the public Internet or on a corporate intranet.

LDAP is part of X.500, which is a standard for directory services in a network.

Naming service

A naming service associates names with distributed objects so that the administered objects are located by using names and not complex network addresses. JNDI provides an abstraction that hides the specifics of the naming service, which makes client applications more portable.

A JMS client specifies a JNDI InitialContext to obtain a JNDI connection to the JMS messaging server. The InitialContext is the starting point in any JNDI lookup and acts like the root of a file system. The JMS directory service that is being used determines the properties that are used to create an InitialContext.

Related reference
JMS message structure
JMS message types
Representation of messages across the JMS Transport
JMS message as input
JMS message for output