Defining which WebSphere MQ classes for Java connection to use

The type of connection to use is determined by the setting of variables in the MQEnvironment class.

Two variables are used:
MQEnvironment.properties
The connection type is determined by the value associated with the key name CMQC.TRANSPORT_PROPERTY. Possible values are as follows:
CMQC.TRANSPORT_MQSERIES_BINDINGS
Connect in bindings mode
CMQC.TRANSPORT_MQSERIES_CLIENT
Connect in client mode
CMQC.TRANSPORT_MQSERIES
Connection mode is determined by the value of the hostname property
MQEnvironment.hostname
Set the value of this variable as follows:
  • For client connections, set the value of this variable to the host name of the IBM® WebSphere® MQ server to which you want to connect
  • For bindings mode, do not set this variable, or set it to null