+

Search Tips | Advanced Search

JMS contexts

A context is a set of bindings that associates names with objects stored in a naming and directory service.

JMS clients (Java applications that use the JMS API) use contexts to look up the names of the JMS objects in the naming and directory service. Every context has a naming convention associated with it.

For more information about LDAP naming considerations, see Configure the JMS administration tool.


Initial contexts

For each location in the naming and directory service, we need to specify an initial context to give a starting point from which the JMS client can resolve the names of the objects in that location of the naming and directory service. JMS clients access the objects in the naming and directory service through the Java Naming Directory Interface (JNDI); the location in the naming and directory service that is defined by the context is known as the JNDI namespace.

When you specify an initial context in IBM MQ Explorer, the full contents of the JNDI namespace are displayed but, in IBM MQ Explorer, we can edit only the IBM MQ classes for JMS objects that are stored there. All of the initial contexts that you add to IBM MQ Explorer are displayed in the Navigator view in the JMS Administered Objects folder, as shown in the following figure.

In the figure, File System Initial Context is the initial context for a location in the local filesystem: C:/JMSAdmin/JMSAdmin1 and LDAP Initial Context is the initial context for a location on an LDAP server, on a computer called hiss with the distinguished name cn=JMSData,dc=ibm,dc=uk.

When you have added the initial context to IBM MQ Explorer, we can create connection factory objects, destination objects, and subcontexts in the JNDI namespace.


Subcontexts

A subcontext is a subdivision of a JNDI namespace and can contain connection factories and destinations as well as other subcontexts. A subcontext is not an object in its own right; it is merely an extension of the naming convention for the objects in the subcontext. We can create multiple subcontexts in a single context.

In the following figure, the subcontext called A Subcontext is bound to the initial context called File System Initial Context. In the file system where the context and subcontext are stored, the subcontext is a sub-directory of the initial context; other JNDI implementations, such as LDAP, might store subcontexts differently.

We can create connection factory objects, destination objects, and other subcontexts in a subcontext.

Parent topic: Create and configure JMS administered objects


Related concepts


Related tasks


Related information

Last updated: 2020-10-04