Using WebSphere Application Server with IBM MQ

IBM® MQ and IBM MQ for z/OS® can be used with, or as an alternative to, the default messaging provider that is included with WebSphere® Application Server.

The IBM MQ messaging provider is installed as part of WebSphere Application Server. This includes a version of the IBM MQ resource adapter, and the IBM MQ Extended Transactional Client functionality, which allows the queue manager to participate in XA transactions managed by the application server. Using the resource adapter, message-driven beans can be configured to use either activation specifications or listener ports.

For the application server to be supported, the IBM MQ resource adapter installation verification test program needs to be deployed into the application server and run successfully. After the IBM MQ resource adapter installation verification test program has been run successfully, the IBM MQ resource adapter can connect to any supported IBM MQ queue manager.

JMS connections from WebSphere Application Server to IBM MQ

Before considering the levels of IBM MQ that can be used with WebSphere Application Server, it is important to understand how Java Message Service (JMS) applications running inside the application server can connect to IBM MQ queue managers.

JMS applications that need to access the resources of an IBM MQ queue manager can do so by using one of the following transport types:
BINDINGS
This transport can be used when the application server and the queue manager are installed on the same machine and operating system image. When using BINDINGS mode, all of the communication between the two products is done using Inter-Process Communication (IPC).
The IBM MQ messaging provider does not include the native libraries required to connect to an IBM MQ queue manager in BINDINGS mode. In order to use a BINDINGS mode connection, IBM MQ must be installed onto the same machine as the application server, and the resource adapter's native library path must be configured to point to the IBM MQ directory where these libraries are located. For more information, see the WebSphere Application Server product documentation:
[z/OS]On z/OS, if you want to connect a WebSphere Application Server connection factory to an IBM MQ queue manger in bindings mode, you must specify the correct IBM MQ libraries in the WebSphere Application Server STEPLIB concatenation. For more information, see IBM MQ libraries and the WebSphere Application Server for z/OS STEPLIB in the WebSphere Application Server product documentation..
CLIENT
The client transport uses TCP/IP to communicate between WebSphere Application Server and IBM MQ. As well as being used when the application server and queue manager are located on different machines, CLIENT mode can also be used when the two products are installed on the same machine and operating system image.

JMS applications can also specify a transport type of BINDINGS_THEN_CLIENT. When this transport type is used, the application will initially attempt to connect to the queue manager using BINDINGS mode - if it is unable to do so, it will try the CLIENT transport.

How to find which version of the IBM MQ resource adapter is installed inside WebSphere Application Server

For information about which version of the IBM MQ resource adapter is installed inside WebSphere Application Server, see the technote Which version of WebSphere MQ Resource Adapter (RA) is shipped with WebSphere Application Server?.

You can use the following Jython and JACL commands to determine the level of the resource adapter that WebSphere Application Server is currently using:
Jython

wmqInfoMBeansUnsplit = AdminControl.queryNames("WebSphere:type=WMQInfo,*")
wmqInfoMBeansSplit = AdminUtilities.convertToList(wmqInfoMBeansUnsplit)
for wmqInfoMBean in wmqInfoMBeansSplit: print wmqInfoMBean; print 
AdminControl.invoke(wmqInfoMBean, 'getInfo', '')
Note: You need to click Return twice after entering this command in order to run it.
JACL

set wmqInfoMBeans [$AdminControl queryNames WebSphere:type=WMQInfo,*]
foreach wmqInfoMBean $wmqInfoMBeans {
puts $wmqInfoMBean;
puts [$AdminControl invoke $wmqInfoMBean getInfo [] []]
}

Updating the resource adapter

Updates to the IBM MQ resource adapter that is installed with the application server are included in WebSphere Application Server Fix Packs. Updating the IBM MQ resource adapter using the Update resource adapter... facility in the WebSphere Application Server Administrative Console is not recommended, since doing so will mean that updates provided in WebSphere Application Server Fix Packs will have no effect.

MQ_INSTALL_ROOT variable

Before Version 7.0, WebSphere Application Server could be configured to use the IBM WebSphere MQ classes for JMS located in an external IBM WebSphere MQ installation to connect to a queue manager by setting the WebSphere variable MQ_INSTALL_ROOT.

From WebSphere Application Server 7.0, MQ_INSTALL_ROOT is only used to locate native libraries, and is overridden by any native library path configured on the resource adapter.

Connecting from WebSphere Application Server to IBM MQ

Attention:
  1. Any supported version of WebSphere Application Server can use the IBM MQ resource adapter that is bundled with it, to connect to any supported version of IBM MQ.
  2. If bindings mode is used, certain libraries in WebSphere Application Server need to match the version of the queue manager to which it is connecting:
  3. The IBM MQ Resource Adapter version is independent of the native (shared) library versions provided by the queue manager installation.

    For example, a WebSphere Application Server Version 8.5, with a IBM WebSphere MQ 7.1 Resource Adapter can still manage a bindings connection to an IBM MQ 8.0 queue manager using the IBM MQ 8.0 native libraries.

For more information, see IBM MQ resource adapter statement of support.

The following table shows what transport types can be used to connect to IBM MQ from all versions of WebSphere Application Server.
Version of IBM MQ or IBM WebSphere MQ BINDINGS transport CLIENT transport
IBM MQ 8.0
Supported.​
  • IBM MQ 8.0 must be installed on the same machine as the application server. ​
  • WebSphere Application Server must be configured to load the native libraries provided with IBM MQ 8.0.
  • [z/OS]On z/OS, if you want to connect a WebSphere Application Server connection factory to an IBM MQ queue manger in bindings mode, the correct IBM MQ libraries must be specified in the WebSphere Application Server STEPLIB concatenation.
Supported
IBM WebSphere MQ 7.5
Supported.​
  • IBM WebSphere MQ 7.5 must be installed on the same machine as the application server. ​
  • WebSphere Application Server must be configured to load the native libraries provided with IBM WebSphere MQ 7.5.
  • [z/OS]On z/OS, if you want to connect a WebSphere Application Server connection factory to an IBM WebSphere MQ queue manger in bindings mode, the correct IBM WebSphere MQ libraries must be specified in the WebSphere Application Server STEPLIB concatenation.
Supported
IBM WebSphere MQ 7.1
Supported.​
  • IBM WebSphere MQ 7.1 must be installed on the same machine as the application server. ​
  • WebSphere Application Server must be configured to load the native libraries provided with IBM WebSphere MQ 7.1.
  • [z/OS]On z/OS, if you want to connect a WebSphere Application Server connection factory to an IBM WebSphere MQ queue manger in bindings mode, the correct IBM WebSphere MQ libraries must be specified in the WebSphere Application Server STEPLIB concatenation.
Supported
The following table shows the versions of WebSphere Application Server that the IBM MQ resource adapter is supported to run in.
Version of IBM MQ resource adapter Which version of WebSphere Application Server can this version of the resource adapter run in?
IBM MQ 8.0 The resource adapter can run in any Java EE 7 compliant version of WebSphere Application Server Liberty

The IBM MQ 8.0 resource adapter is not supported to run in WebSphere Application Server traditional. The resource adapter already installed in WebSphere Application Server traditional should be used to connect to IBM MQ 8.0 queue managers.

IBM WebSphere MQ 7.5 The resource adapter can be used in J2EE 1.4 or later compliant application servers.

The version of the IBM WebSphere MQ resource adapter included in WebSphere Application Server Version 8.0 and Version 7.0 should be used in these environments.

IBM WebSphere MQ 7.5.0, Fix Pack 2 and APAR IC92914 add support for deploying the resource adapter into WebSphere Application Server Liberty.

IBM WebSphere MQ 7.1 The resource adapter can be used in J2EE 1.4 or later compliant application servers.

The version of the IBM WebSphere MQ resource adapter included in WebSphere Application Server Version 8.0 and Version 7.0 should be used in these environments.