Use IBM MQ classes for Java
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.
Note: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 Version 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 Use WebSphere MQ Java Interfaces in J2EE/JEE Environments.
IBM MQ classes for Java is one of two alternative APIs that Java applications can for use to access IBM MQ resources. The other API is IBM MQ classes for JMS.
From IBM MQ Version 8.0, the IBM MQ classes for Java are built with Java 7.
The Java 7 runtime environment supports running earlier class file versions.
IBM MQ classes for Java encapsulate the Message Queue Interface (MQI), the native IBM MQ API and use a similar object model to the C++ and .NET interfaces to IBM MQ.
Programmable options allow IBM MQ classes for Java to connect to IBM MQ in either of the following ways:- In client mode as an IBM MQ MQI client by using Transmission Control Protocol/Internet Protocol (TCP/IP)
- In bindings mode, connecting directly to IBM MQ by using the Java Native Interface (JNI)
Note: Automatic client reconnection is not supported by IBM MQ classes for Java.
Client mode connection
An IBM MQ classes for Java application can connect to any supported queue manager by using client mode.
To connect to a queue manager in client mode, an IBM MQ classes for Java application can run on the same system on which the queue manager is running, or on a different system. In each case, IBM MQ classes for Java connects to the queue manager over TCP/IP.
For more information on how to write applications to use client mode connections, see IBM MQ classes for Java connection modes.
Bindings mode connection
When used in bindings mode, IBM MQ classes for Java uses the Java Native Interface (JNI) to call directly into the existing queue manager API, rather than communicating through a network. In most environments, connecting in bindings mode provides better performance for IBM MQ classes for Java applications than connecting in client mode, by avoiding the cost of TCP/IP communication.
Applications that use the IBM MQ classes for Java to connect in bindings mode must run on the same system as the queue manager to which they are connecting.
The Java Runtime Environment, that is being used to run the IBM MQ classes for Java application, must be configured to load the IBM MQ classes for Java libraries; see IBM MQ classes for Java libraries for further information.
For more information on how to write applications to use bindings mode connections, see IBM MQ classes for Java connection modes.
- Why should I use IBM MQ classes for Java?
A Java application can use either IBM MQ classes for Java or IBM MQ classes for JMS to access IBM MQ resources. - Prerequisites for IBM MQ classes for Java
To use IBM MQ classes for Java, we need certain other software products. - Running IBM MQ classes for Java applications within Java EE
There are certain restrictions and design considerations that must be taken into account before using IBM MQ classes for Java in Java EE. - Character string conversions in IBM MQ classes for Java
From IBM MQ Version 8.0, some of the default behavior regarding character string conversion in the IBM MQ classes for Java has changed. - Installing and configuring IBM MQ classes for Java
This section describes the directories and files that are created when you install IBM MQ classes for Java, and tells you how to configure IBM MQ classes for Java after installation. - Java and JMS client connectivity to batch applications running on z/OS
An IBM MQ classes for JMS, or IBM MQ classes for Java, application on z/OS can connect to a queue manager on z/OS, that has the ADVCAP(ENABLED) attribute, by using a client connection. - Writing IBM MQ classes for Java applications
This collection of topics provides information to assist with writing Java applications to interact with IBM MQ systems. - IBM MQ classes for Java environment-dependent behavior
IBM MQ classes for Java allow you to create applications that can run against different versions of IBM MQ. This collection of topics describes the behavior of the Java classes dependent on these different versions. - IBM MQ classes for Java
Parent topic: Developing JMS and Java applications
Related concepts
Related information
- IBM MQ Java language interfaces
- Tracing IBM MQ classes for Java applications
- Java and JMS troubleshooting