Accessing IBM MQ from Java programs
Java™ programs that run in CICS® can use either the IBM® MQ classes for Java, or the IBM MQ classes for JMS, to access IBM MQ. IBM MQ classes for JMS are the preferred interfaces to IBM MQ from a Java application that runs in CICS. (The IBM MQ classes for Java continue to be supported but newer applications should use IBM classes for JMS.
For an overview of how CICS works with IBM MQ, see CICS and IBM MQ.
IBM MQ classes for Java encapsulate the Message Queue Interface (MQI), the native IBM MQ API. The classes use a similar object model to the C++ and .NET interfaces to IBM MQ. In addition, you can exploit the full range of features of IBM MQ beyond the features that are available through JMS. IBM MQ classes for JMS implement the JMS interfaces for IBM MQ as the messaging system.
- A CICS integrated-mode Liberty JVM server. This JVM server supports IBM MQ classes for JMS. It provides managed JMS connection factories and MDB support, and integrated CICS transactions and security. IBM MQ classes for Java are not supported.
- A CICS standard-mode Liberty JVM server. This JVM server supports IBM MQ classes for JMS. It provides managed JMS connection factories and MDB support but without integrated CICS transactions. IBM MQ classes for Java are not supported.
- An OSGi JVM server. This JVM server supports IBM MQ classes for JMS. It supports non-managed JMS connection factories with integrated CICS transactions and security. IBM MQ classes for Java are also supported, in bindings-mode only.
- MQ client mode: a TCP/IP network connection to an IBM MQ queue manager
- MQ bindings mode: a local cross memory interface to the queue manager, using the IBM MQ RRS adapter
- CICS-MQ adapter and MQCONN: a local cross memory interface to the queue manager, using the CICS-MQ adapter
Table 1 shows which JVM servers support which IBM MQ classes, and through which connectivity options.
MQ connectivity | CICS standard-mode Liberty JVM server | CICS integrated-mode Liberty JVM server | OSGi JVM server |
---|---|---|---|
Client mode |
|
|
Not supported |
Bindings mode |
|
Not supported |
|
CICS-MQ adapter and MQCONN | Not applicable | Not applicable |
|