Connection options for WebSphere MQ classes for Java
WebSphere® MQ classes for Java can connect in client or bindings mode.
- As a WebSphere MQ MQI client using Transmission Control Protocol/Internet Protocol (TCP/IP)
- In bindings mode, connecting directly to WebSphere MQ using the Java Native Interface (JNI)
Clients cannot be run on z/OS®, but clients on other platforms can connect to a WebSphere MQ for z/OS queue manager if the Client Attach Facility is installed.
The following sections describe the client mode and bindings mode connection options in more detail.
Client connection
To connect to a queue manager in client mode, a WebSphere 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, WebSphere MQ classes for Java connects to the queue manager over TCP/IP.
A WebSphere MQ classes for Java application can connect to any supported queue manager using client mode.
For more information on how to write applications to use client mode connections, see WebSphere MQ classes for Java connection modes.
Bindings connection
When used in bindings mode, WebSphere 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 WebSphere MQ classes for Java applications than connecting in client mode, by avoiding the cost of TCP/IP communication.
Applications that use the WebSphere 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 WebSphere MQ classes for Java application, must be configured to load the WebSphere MQ classes for Java libraries; see The WebSphere MQ classes for Java libraries for further information.
For more information on how to write applications to use bindings mode connections, see WebSphere MQ classes for Java connection modes.