Underlying MQ JMS connection pooling
QueueConnections and QueueSessions are pooled at the Java layer by WAS. At a lower level the MQ JMS classes are also pooling the physical connections to the MQ queue manager. This pooling is done automatically by the MQ JMS classes when accessing the Embedded JMS server or WebSphere MQ server. It is possible to change two of the parameters that control the tidying up of idle connections in this pool should you need to.
There is no association between the MQ JMS connection pool and the QCF or TCF connection or session pool. This lower level connection pool will be used by the MQ JMS classes when needed.
- MQJMS.POOLING.TIMEOUT
By default, the MQ JMS pooling will maintain each established idle connection to the queue manager for five minutes. Change this value to specify a different lifetime for an idle connection. The value should be entered in milliseconds.
- MQJMS.POOLING.THRESHOLD
The MQ JMS connection pooling is also controlled by the number of idle connections in it. If the number of idle/unused connections reaches the default of 10 connections then any other connection becoming idle will be destroyed. This is basically the minimum size for the pool. Changing this value will allow you to control how many established connections can survive for the time-out setting above.
Use these two settings to control how many low level connections are available in the pool and how long they will survive if they continue to not be used.
Follow these steps to use these two values.
- Go to...
Servers | Application Servers | <MyAppServer> | Message Listener Service | Custom Properties- Click the New button.
- For name specify either:
MQJMS.POOLING.THRESHOLD
MQJMS.POOLING.TIMEOUT- Enter the value you wish to use, and an optional description. Remember the time-out is in milliseconds.
- Press OK and save your configuration. The settings will come into operation the next time the appserver is restarted.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.