Developing JMS/Jakarta Messaging and Java applications

IBM® MQ provides three Java language interfaces: IBM MQ classes for Jakarta Messaging, IBM MQ classes for JMS, and IBM MQ classes for Java.

[Jakarta Messaging 3.0]IBM MQ classes for Jakarta Messaging
IBM MQ classes for Jakarta Messaging is a Jakarta Messaging provider that implements the Jakarta Messaging interfaces for IBM MQ as the messaging system. The Jakarta Connectors Architecture provides a standard way of connecting applications running in a Jakarta EE environment to an Enterprise Information System (EIS) such as IBM MQ or Db2®.
For more information, see Why should I use IBM MQ classes for Jakarta Messaging? and Accessing IBM MQ from Java - Choice of API.
[JMS 2.0]IBM MQ classes for JMS
IBM MQ classes for JMS is a JMS provider that implements the JMS interfaces for IBM MQ as the messaging system. The Java Platform, Enterprise Edition Connector Architecture (JCA) provides a standard way of connecting applications running in a Java EE environment to an Enterprise Information System (EIS) such as IBM MQ or Db2.
For more information, see Why should I use IBM MQ classes for JMS? and Accessing IBM MQ from Java - Choice of API.
IBM MQ classes for Java
IBM MQ classes for Java enable you to use IBM MQ in a Java environment. IBM MQ classes for Java allow a Java application to connect to IBM MQ as an IBM MQ client, or connect directly to an IBM MQ queue manager.
IBM MQ classes for Java encapsulates the Message Queue Interface (MQI), the native IBM MQ API, and uses the same object model as other object-oriented interfaces, whereas IBM MQ classes for JMS and IBM MQ classes for Jakarta Messaging implement Java messaging interfaces from Oracle and the Java Community Process respectively.
For more information, see Why should I use IBM MQ classes for Java? and Accessing IBM MQ from Java - Choice of API.
Notes:
  • [Stabilized]IBM will make no further enhancements to the IBM MQ classes for Java and they are functionally stabilized at the level shipped in IBM MQ 8.0. Existing applications that use the IBM MQ classes for Java continue to be fully supported, but new features will not be added and requests for enhancements will be rejected. Fully supported means that defects will be fixed together with any changes necessitated by changes to IBM MQ System Requirements.
  • The IBM MQ classes for Java are not supported in IMS.
  • The IBM MQ classes for Java are not supported in WebSphere® Liberty. They must not be used with either the IBM MQ Liberty messaging feature, or with the generic JCA support. For more information, see Using WebSphere MQ Java Interfaces in J2EE/JEE Environments.

Important changes in Java versions

Sometimes, changes in Java versions can cause warning messages or problems for your IBM MQ classes for Jakarta Messaging, IBM MQ classes for JMS, or IBM MQ classes for Java applications. Such changes are summarized in this section.

IBM Semeru Runtime 25
TLS_RSA_* CipherSpecs are disabled
TLS_RSA_* CipherSpecs are disabled from IBM Semeru Runtime 25. If your IBM MQ classes for JMS/Jakarta Messaging or IBM MQ classes for Java application uses any of these CipherSpecs, do one of the following:
  • Update the application to use a supported CipherSpec.
  • Remove the algorithm from the disabled list in the java.security file.

For more information, see TLS CipherSpecs and CipherSuites in IBM MQ classes for JMS and TLS CipherSpecs and CipherSuites in IBM MQ classes for Java.

Warning messages
  • If you see the following warning when running your application with Java 25, you can suppress it by passing the --enable-native-access=ALL-UNNAMED JVM parameter when you start the application:
    WARNING: A restricted method in java.lang.System has been called
    WARNING: java.lang.System::loadLibrary has been called by com.ibm.mq.jmqi.local.LocalMQ in an unnamed module (file:/opt/mqm/java/lib/com.ibm.mq.allclient.jar)
    WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
    WARNING: Restricted methods will be blocked in a future release unless native access is enabled
  • If you see the following warning when running your application in a Java 2 Platform, Enterprise Edition (Java EE) environment like WebSphere Liberty with Java Runtime Environment 25 (JRE25), set the Java environment variable JAVA_TOOL_OPTIONS=-Djdk.xml.enableExtensionFunctions=true to resolve the error:
    Errors while applying transformations: javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of 
    the extension element 'redirect' is not allowed when extension functions are disabled by the secure processing 
    feature or the property 'jdk.xml.enableExtensionFunctions'. To enable extension functions, set 
    'jdk.xml.enableExtensionFunctions' to 'true'
IBM Semeru Runtime 21
Default encoding is changed
In IBM Semeru Runtime 21, the default encoding is UTF-8 whereas in earlier supported versions of Java, the default encoding was the operating system default (for example, IBM-1047 on z/OS®). This change can affect how an application handles the read or write operations of files, such as text files or properties files, that are not in UTF-8. For example, files in EBCDIC. You can fix default encoding issues by using one of the following options:
  • Specify the encoding for the Java runtime environment to use by setting the file.encoding parameter on the command line when you run the Java application. For example:
    java -Dfile.encoding=IBM-1047 myApplication
    The COMPAT keyword specifies the operating system default:
    java -Dfile.encoding=COMPAT myApplication
  • Update the Java application to explicitly specify the encoding for every file read/write operation.
For more information about this change for z/OS, see File encoding and UTF-8 as default charset in the IBM Semeru Runtime 21 documentation.