Connection modes for WebSphere MQ classes for JMS

A WebSphere® MQ classes for JMS application can connect to a queue manager in either client or bindings mode. In client mode, WebSphere MQ classes for JMS connects to the queue manager over TCP/IP. In bindings mode, WebSphere MQ classes for JMS connects directly to the queue manager using the Java Native Interface (JNI).

An application running in WebSphere Application Server on z/OS® can connect to a queue manager in either bindings or client mode, but an application running in any other environment on z/OS can connect to a queue manager only in bindings mode. An application running on any other platform can connect to a queue manager in either bindings or client mode.

You can use the current or any earlier supported version of WebSphere MQ classes for JMS with a current queue manager, and you can use a current or earlier supported version of queue manager with the current version of WebSphere MQ classes for JMS. If you mix different versions, function is limited to the level of the earlier version.

The following sections describe each of the connection modes in more detail.

Client mode

To connect to a queue manager in client mode, a WebSphere MQ classes for JMS 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 JMS connects to the queue manager over TCP/IP.

Bindings mode

To connect to a queue manager in bindings mode, a WebSphere MQ classes for JMS application must run on the same system on which the queue manager is running.

The WebSphere MQ classes for JMS connects directly to the queue manager using the Java Native Interface (JNI). To use the bindings transport, the WebSphere MQ classes for JMS must be run in an environment that has access to the WebSphere MQ Java Native Interface libraries; see Configuring the Java Native Interface (JNI) libraries for further information.

The WebSphere MQ classes for JMS support the following values for ConnectOption :
  • MQCNO_FASTPATH_BINDING
  • MQCNO_STANDARD_BINDING
  • MQCNO_SHARED_BINDING
  • MQCNO_ISOLATED_BINDING
  • MQCNO_SERIALIZE_CONN_TAG_QSG
  • MQCNO_RESTRICT_CONN_TAG_QSG
  • MQCNO_SERIALIZE_CONN_TAG_Q_MGR
  • MQCNO_RESTRICT_CONN_TAG_Q_MGR

To change the connection options used by the WebSphere MQ classes for JMS, modify the Connection Factory property CONNOPT.

For further information on connection options, see Connecting to a queue manager using the MQCONNX call

To use the bindings transport, the Java Runtime Environment being used must support the Coded Character Set Identifier (CCSID) of the queue manager that the WebSphere MQ classes for JMS are connecting to.

Details on how to determine what CCSID's are supported by a Java Runtime Environment can be found in WebSphere MQ FDC with Probe id 21 generated when using the WebSphere MQ V7 classes for Java or WebSphere MQ V7 classes for JMS .

Bindings, then client mode

This is the default. When connecting to a queue manager in this mode, a WebSphere MQ classes for JMS application will attempt to connect in bindings mode, which requires the queue manager to reside on the same machine as the application. Should the connection be unsuccessful, the application will then attempt to connect in client mode, allowing the queue manager to reside either locally on the same machine as the application, or remotely.