Using IBM MQ classes for JMS in an OSGi JVM server

Java™ programs running in an OSGi JVM server can use JMS to access IBM® MQ. When a CICS® Java application makes JMS requests, the requests are processed by the MQ messaging provider. Support is provided for using the classic (JMS 1.1) and simplified (JMS 2.0) interfaces, provided that CICS is connected to a level of IBM MQ queue manager that supports the appropriate level of JMS and is using a suitable version of the IBM MQ classes for JMS.

For an introduction, see How it works: IBM MQ classes for JMS. For information about how IBM MQ implements JMS, see Using IBM MQ classes for JMS in the IBM MQ documentation, including IBM MQ classes for JMS JavaDoc and information about messages, application functions, and accessing MQ features in Writing IBM MQ classes for JMS applications. To compare levels of JMS specification, see Java Message Service Specification

In a CICS environment, the IBM MQ classes for JMS allow connections to be made through an OSGi JVM server. This supports non-managed JMS connection factories, with integrated CICS transactions and security. If you want to use managed JMS connection factories or MDBs in your application, use a CICS Liberty JVM server instead.

Figure 1. Applications connecting to IBM MQ using JMS and running in a CICS OSGi server
Image described in surrounding text

Things to check

  • The connection to IBM MQ. With an OSGi JVM server, only bindings mode connections to a local queue manager are supported.
  • The level of JMS that is supported by the IBM queue manager that CICS connects to. IBM MQ for z/OS Version 7.1 only supports JMS 1.1. IBM MQ Version 8.0 and above support both JMS 1.1 and JMS 2.0.
  • You have defined a CICS MQCONN resource.
  • There are some programming restrictions, described in Programming with IBM MQ classes for JMS with an OSGi JVM server.

Where next?

To use JMS in an application, you must: