Use the IBM MQ resource adapter
The resource adapter allows applications that are running in an application server to access IBM MQ resources. It supports inbound and outbound communication.
What the resource adapter contains
The Java Platform, Enterprise Edition Connector Architecture (JCA) provides a standard way of connecting applications that are running in a Java EE environment to an Enterprise Information System (EIS) such as IBM MQ or Db2 . The IBM MQ resource adapter implements the JCA 1.7 interfaces and contains the IBM MQ classes for JMS. It allows JMS applications and message driven beans (MDBs), running in an application server, to access the resources of an IBM MQ queue manager. The resource adapter supports both the point-to-point domain and the publish/subscribe domain.
The IBM MQ resource adapter supports two types of communication between an application and a queue manager:
- Outbound communication
- An application starts a connection to a queue manager, and then sends JMS messages to JMS destinations and receives JMS messages from JMS destinations in a synchronous manner.
- Inbound communication
- A JMS message that arrives at a JMS destination is delivered to an MDB, which processes the message asynchronously.
The resource adapter also contains the IBM MQ classes for Java. The classes are automatically available to applications that are running in an application server that the resource adapter has been deployed into, and allow applications that are running in that application server to use the IBM MQ classes for Java API when they are accessing resources of an IBM MQ queue manager.
The use of the IBM MQ classes for Java within a Java EE environment is supported with restrictions. For information about these restrictions, see Running IBM MQ classes for Java applications within Java EE.
Which version of the resource adapter to use
The Java Platform, Enterprise Edition (Java EE) version of the application server that we are using determines the version of the resource adapter that we must use:
- Java EE 7
- The IBM MQ Version 8.0 and later resource adapter supports JCA v1.7 and provides JMS 2.0 support. This resource adapter needs to be deployed within a Java EE 7 and later application server (see IBM MQ resource adapter statement of support).
- Java EE 5 and Java EE 6
- The IBM WebSphere MQ Version 7.5 resource adapter supports Java EE Connector Architecture (JCA) v1.5 and provides JMS 1.1 support. To provide full integration with WebSphere Liberty, the IBM WebSphere MQ Version 7.5 resource adapter is updated to APAR IC92914 from Version 7.5.0, Fix Pack 2. This resource adapter retains full compatibility with other Java EE 5 and later application servers (see WebSphere MQ resource adapter v7.1 and later statement of support).
Use the resource adapter with WebSphere Application Server traditional
From Version 9.0, the IBM MQ resource adapter is pre-installed within WebSphere Application Server traditional Version 9.0 or later. Therefore, there is no requirement to install a new resource adapter.Note: An IBM MQ Version 9.0 or later resource adapter can connect in CLIENT or BINDINGS transport mode to any in-service IBM MQ queue manager.Use the resource adapter with WebSphere Liberty
To connect to IBM MQ from WebSphere Liberty, we must use the IBM MQ resource adapter. Since Liberty does not contain the IBM MQ resource adapter, we must obtain it separately from Fix Central. The version of the resource adapter that we use depends on the Java EE version of the application server.
For more information about how to download and install the resource adapter, see Installing the resource adapter in Liberty.
- IBM MQ resource adapter statement of support
The resource adapter that comes with IBM MQ Version 8.0 or later implements the JMS 2.0 specification. It can be deployed only into an application server that is Java Platform, Enterprise Edition 7 (Java EE 7) compliant and therefore supports JMS 2.0. - Limitations of the IBM MQ resource adapter
The IBM MQ resource adapter is supported on all IBM MQ platforms. However, when we use the IBM MQ resource adapter, some features of IBM MQ are unavailable or limited. - WebSphere Application Server and the IBM MQ resource adapter
The IBM MQ resource adapter is used by applications that perform JMS messaging with the IBM MQ messaging provider in WebSphere Application Server. - Liberty and the IBM MQ resource adapter
The IBM MQ resource adapter can be installed into WebSphere Liberty Version 8.5.5, Fix Pack 2 or later, by using either the wmqJmsClient-1.1 or wmqJmsClient-2.0 feature, depending on which version of the resource adapter we are installing. Alternatively we can, subject to some restrictions, install the resource adapter by using generic Java Platform, Enterprise Edition Connector Architecture (Java EE JCA) support. - Installing the IBM MQ resource adapter
The IBM MQ resource adapter is supplied as a resource archive (RAR) file. Install the RAR file in the application server. We might need to add directories to the system path. - Configure the IBM MQ resource adapter
To configure the IBM MQ resource adapter, you define various Java Platform, Enterprise Edition Connector Architecture (JCA) resources and, optionally, system properties. We must also configure the resource adapter to run the installation verification test (IVT) program. This is important because IBM service might require this program to be run to indicate that any non-IBM application server has been correctly configured. - Verify the resource adapter installation
The installation verification test (IVT) program for the IBM MQ resource adapter is supplied as an EAR file. To use the program, we must deploy it and define some objects as JCA resources. - Installing and testing the resource adapter in GlassFish Server
To install the IBM MQ resource adapter in GlassFish Server on a Windows operating system, we must first create and start a domain. We can then deploy and configure the resource adapter, and deploy and run the installation verification test (IVT) application. - Installing and testing the resource adapter in Wildfly
If we are installing the IBM MQ resource adapter in Wildfly V10, we must first make some configuration file changes to add a subsystem definition for the IBM MQ resource adapter. We can then deploy the resource adapter and test it by installing and running the installation verification test (IVT) application.
Parent topic: Developing JMS and Java applications
Related concepts
- Configure the resource adapter for inbound communication
- Configure the resource adapter for outbound communication
- Use IBM MQ classes for JMS
- Use IBM MQ classes for Java
Related information
- Configure the application server to use the latest resource adapter maintenance level
- Problem determination for the IBM MQ resource adapter
WebSphere Application Server topics
- Maintaining the IBM MQ resource adapter
- Deploying JMS applications to Liberty to use the IBM MQ messaging provider