Use 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).
- 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?.
We 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: We 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 Version 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.
Connect from WebSphere Application Server to IBM MQ
Attention:- 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.
- 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:
- WebSphere Application Server must be configured to load the native libraries provided with IBM MQ Version 9.1. See Configure the Java Native Interface (JNI) libraries for more information.
- On z/OS, we must specify the
correct IBM MQ libraries in the WebSphere Application Server STEPLIB concatenation.
See IBM MQ libraries and the WebSphere Application Server for z/OS STEPLIB for details of the IBM MQ libraries we need.
If we have libraries for one version of IBM MQ in LINKLIST (LINKLST), we can connect to a different version of IBM MQ by overriding the libraries with STEPLIB.
- 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 Version 7.1 Resource Adapter can still manage a bindings connection to an IBM MQ Version 9.0 queue manager using the IBM MQ Version 9.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 Version 9.2 |
Supported.
|
Supported |
IBM MQ Version 9.1 |
Supported.
|
Supported |
IBM MQ Version 9.0 |
Supported.
|
Supported |
IBM MQ Version 8.0 |
Supported.
|
Supported |
IBM WebSphere MQ Version 7.5 |
Supported.
|
Supported |
IBM WebSphere MQ Version 7.1 |
Supported.
|
Supported |
Version of IBM MQ resource adapter | Which version of WebSphere Application Server can this version of the resource adapter run in? |
---|---|
IBM MQ Version 9.2 |
The resource adapter can run in:
|
IBM MQ Version 9.1 |
The resource adapter can run in:
|
IBM MQ Version 9.0 |
The resource adapter can run in:
|
IBM MQ Version 8.0 | The resource adapter can run in any Java EE 7
compliant version of WebSphere Liberty
The IBM MQ Version 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 Version 8.0 queue managers. |
IBM WebSphere MQ Version 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 Version 7.5.0, Fix Pack 2 and APAR IC92914 add support for deploying the resource adapter into WebSphere Liberty. |
IBM WebSphere MQ Version 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. |
Related concepts
Related information