Configure JMS resources
One of the ways in which a JMS application can create and configure the resources that it needs to connect to IBM MQ and access destinations for sending or receiving messages is by using the Java Naming and Directory Interface (JNDI) to retrieve administered objects from a location within the naming and directory service that is called the JNDI namespace. Before a JMS application can retrieve administered objects from a JNDI namespace, we must first create and configure the administered objects.
We can create and configure administered objects in IBM MQ by using either of the following tools:
- IBM MQ Explorer
- We can use IBM MQ Explorer to create and administer JMS object definitions that are stored in LDAP, in a local file system, or other locations.
- IBM MQ JMS administration tool
- The IBM MQ JMS administration tool is a command-line tool used to create and configure IBM MQ JMS objects that are stored in LDAP, in a local file system, or other locations. The JMS administration tool uses a syntax that is similar to runmqsc, and also supports scripting.
The administration tool uses a configuration file to set the values of certain properties. A sample configuration file is supplied, which we can edit to suit the system before you start by using the tool to configure JMS resources. For more information about the configuration file, see Configure the JMS administration tool.
IBM MQ JMS applications that are deployed to WebSphere Application Server need to access JMS objects from the application server JNDI repository. Therefore, if we use JMS messaging between WebSphere Application Server and IBM MQ, create objects in WebSphere Application Server that correspond to the objects that you create in IBM MQ.
IBM MQ Explorer and the IBM MQ JMS administration tool cannot be used to administer IBM MQ JMS objects that are stored in WebSphere Application Server. Instead, we can create and configure administered objects in WebSphere Application Server by using either of the following tools:
- WebSphere Application Server administrative console
- The WebSphere Application Server administrative console is a web-based tool used to manage IBM MQ JMS objects in WebSphere Application Server.
- WebSphere Application Server wsadmin scripting client
- The WebSphere Application Server wsadmin scripting client provides specialized commands to administer IBM MQ JMS objects in WebSphere Application Server.
To use a JMS application to access the resources of an IBM MQ queue manager from within WebSphere Application Server, we must use the IBM MQ messaging provider in WebSphere Application Server, which contains a version of the IBM MQ classes for JMS. The IBM MQ resource adapter that is supplied with WebSphere Application Server is used by all applications that carry out JMS messaging with the IBM MQ messaging provider. The IBM MQ resource adapter is usually updated automatically when you apply WebSphere Application Server fix packs, but if you have previously manually updated the resource adapter, we must manually update your configuration to ensure that maintenance is applied correctly.
- Configure connection factories and destinations in a JNDI namespace
JMS applications access administered objects in the naming and directory service through the Java Naming and Directory Interface (JNDI). The JMS administered objects are stored in a location within the naming and directory service that is referred to as the JNDI namespace. A JMS application can look up the administered objects to connect to IBM MQ and access destinations for sending or receiving messages. - Configure JMS objects using IBM MQ Explorer
Use the IBM MQ Explorer graphical user interface to create JMS objects from IBM MQ objects, and IBM MQ objects from JMS objects, as well as for administering and monitoring other IBM MQ objects. - Configure JMS objects using the administration tool
We can use the IBM MQ JMS administration tool to define the properties of eight types of IBM MQ classes for JMS object and to store them within a JNDI namespace. Applications can then use JNDI to retrieve these administered objects from the namespace. - Configure JMS resources in WebSphere Application Server
To configure JMS resources in WebSphere Application Server, we can either use the administrative console or wsadmin commands. - Configure the application server to use the latest resource adapter maintenance level
To ensure that the IBM MQ resource adapter is automatically updated to the latest available maintenance level when you apply WebSphere Application Server fix packs, we can configure all servers in the environment to use the latest version of the resource adapter contained in the WebSphere Application Server fix pack that we have applied to the installation of each node. - Configure the JMS PROVIDERVERSION property
The IBM MQ messaging provider has three modes of operation: normal mode, normal mode with restrictions, and migration mode. We can set the JMS PROVIDERVERSION property to select which of these modes a JMS application uses to publish and subscribe. - Removing WebSphere Application Server durable subscriptions
When we use the IBM MQ messaging provider with WebSphere Application Server Version 7.0 and Version 8.0, durable subscriptions created by message-driven bean applications bound to activation specifications are not removed. Durable subscriptions can be removed using either the IBM MQ Explorer or a IBM MQ command line utility.
Parent topic: Configure IBM MQ
Related information