Choosing client or bindings transport

 

WebSphere MQ JMS can communicate with WebSphere MQ using either client or bindings transport. (However, client transport is not supported on z/OS.) If you use the Java™ bindings, the JMS application and the WebSphere MQ queue manager must be located on the same machine. If you use the client, the queue manager can be on a different machine from the application.

The contents of the connection factory object determine which transport to use. Using the WebSphere MQ JMS administration tool describes how to define a factory object for use with client or bindings transport.

The following code fragment illustrates how we can define the transport within an application:

String HOSTNAME = "machine1";
String QMGRNAME = "machine1.QM1";
String CHANNEL = "SYSTEM.DEF.SVRCONN";
 
factory = new MQQueueConnectionFactory();
factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setQueueManager(QMGRNAME);
factory.setHostName(HOSTNAME);
factory.setChannel(CHANNEL);

When used in client mode, WebSphere MQ JMS does not access information stored in a qm.ini file, or the equivalent information stored in the Windows Registry. Entries in a qm.ini file, such as the KeepAlive entry, are therefore ignored.


uj24390_