Configure your queue manager so that IBM MQ classes for JMS applications can connect in client mode

To configure your queue manager so that IBM MQ classes for JMS applications can connect in client mode, create a server connection channel definition and start a listener.


Create a server connection channel definition

On all platforms, we can use the MQSC command DEFINE CHANNEL to create a server connection channel definition. See the following example:
DEFINE CHANNEL(JAVA.CHANNEL) CHLTYPE(SVRCONN) TRPTYPE(TCP)
On IBM i, we can use the CL command CRTMQMCHL instead, as in the following example:
CRTMQMCHL CHLNAME(JAVA.CHANNEL) CHLTYPE(*SVRCN)
TRPTYPE(*TCP)
MQMNAME(QMGRNAME)
In this command, QMGRNAME is the name of our queue manager.

On Linux and Windows, we can also create a server connection channel definition using IBM MQ Explorer.

On z/OS we can use the operations and control panels to create a server connection channel definition .

The name of the channel (JAVA.CHANNEL in the previous examples) must be the same as the channel name specified by the CHANNEL property of the connection factory that the application uses to connect to the queue manager. The default value of the CHANNEL property is SYSTEM.DEF.SVRCONN.


Starting a listener

We must start a listener for the queue manager if one is not already started.

On Multiplatforms, we can use the MQSC command START LISTENER to start a listener after first creating a listener object by using the MQSC command DEFINE LISTENER, as shown in the following example:
DEFINE LISTENER(LISTENER.TCP) TRPTYPE(TCP) PORT(1414)
START LISTENER(LISTENER.TCP)
On z/OS, we use only the START LISTENER command, as in the following example, but note that the channel initiator address space must be started before we can start a listener:
START LISTENER TRPTYPE(TCP) PORT(1414)
On IBM i, we can also use the CL command STRMQMLSR to start a listener, as in the following example:
STRMQMLSR PORT(1414) MQMNAME(QMGRNAME)
In this command, QMGRNAME is the name of our queue manager. On UNIX, Linux, and Windows, we can also use the control command runmqlsr to start a listener, as in the following example:
runmqlsr -t tcp -p 1414 -m QMgrName
In this command, QMgrName is the name of our queue manager.

On Linux and Windows, we can also start a listener using IBM MQ Explorer.

On z/OS, we can also use the operations and control panels to start a listener.

The number of the port on which the listener is listening must be the same as the port number specified by the PORT property of the connection factory that the application uses to connect to the queue manager. The default value of the PORT property is 1414.

Parent topic: Post installation setup for IBM MQ classes for JMS applications