JMS connection factories
Applications running inside of WebSphere® Application Server, that use an IBM® MQ messaging provider connection factory to create connections and sessions, have active conversations for every JMS connection created from the connection factory, and for every JMS session created from a JMS connection.
One conversation for every JMS connection that has been created from the connection factory
Each JMS connection factory has an associated connection pool, divided into two sections, the free pool and the active pool. Both pools are initially empty.
When an application creates a JMS connection from a connection factory, WebSphere Application Server checks to see if there is a JMS connection in the free pool. If there is, it is moved to the active pool and given to the application. Otherwise, a new JMS connection is created, put in the active pool and returned to the application. The maximum number of connections that can be created from a connection factory is specified by the connection factory connection pool property Maximum connections. The default valuue for this property is 10.
After an application has finished with a JMS connection and closed it, the connection is moved from the active pool to the free pool, where it is available for reuse. The connection pool property Unused timeout defines how long a JMS connection can stay in the free pool before it is disconnected. The default value for this property is 1800 seconds (30 minutes).
When a JMS connection is first created, a conversation between WebSphere Application Server and IBM MQ starts. The conversation remains active until the connection is closed when value of the Unused timeout property for the free pool is exceeded.
One conversation for every JMS session that has been created from a JMS connection
Every JMS connection that is created from a IBM MQ messaging provider connection factory has an associated JMS session pool. There session pools work in the same way as connection pools. The maximum number of JMS Sessions that can be created from a single JMS connection is determined by the connection factory session pool property Maximum connections. The default value of this property is 10.
A conversation starts when a JMS session is first created, The conversation remains active until the JMS session is closed because it has remained in the free pool for longer than the value of the Unused timeout property for the session pool.
Calculating a value for the SHARECNV property
Maximum number of conversations =
connection Pool Maximum Connections +
(connection Pool Maximum Connections * Session Pool Maximum Connections) Maximum number of channel instances =
Maximum number of conversations / SHARECNV for the channel being used Any remainder from this calculation can be rounded up.
Maximum number of conversations =
connection Pool Maximum Connections +
(connection Pool Maximum Connections * Session Pool Maximum Connections) For
example:
= 10 + (10 * 10)
= 10 + 100
= 110Maximum number of channel instances = Maximum number of conversations / SHARECNV for the channel being usedFor
example:
= 110 / 10
= 11 (rounded up to nearest connection)