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.
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?
- Ensure that you have access to the IBM MQ classes for JMS in your development environment, either as a component of IBM MQ product or as a JAR file from FixCentral (see Using IBM MQ classes for JMS in the IBM MQ documentation for information on how to do this.)
- Develop your application to use non-managed JMS connection factory. For more information, see Programming with IBM MQ classes for JMS with an OSGi JVM server.
- Add your application to a CICS bundle project, export to zFS, and install it into the OSGi JVM server.
- Configure the CICS-MQ adapter. to connect to IBM MQ. For more information, see Setting up the CICS-MQ adapter.
- Configure the CICS OSGi server environment. For more information, see Configuring an OSGi JVM server to support JMS .