Sharing a TCP/IP connection in IBM WebSphere MQ classes for Java

Multiple instances of an MQI channel can be made to share a single TCP/IP connection.

In IBM® WebSphere® MQ classes for Java, you use the MQEnvironment.sharingConversations variable to control the number of conversations that can share a single TCP/IP connection.

The SHARECNV attribute is a best effort approach to connection sharing. Therefore when a SHARECNV value greater than 0 is used with the IBM WebSphere MQ classes for Java it is not guaranteed that a new connection request will always share an already established connection.