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.

  1. 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.

  2. 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.

  1. Go to...

    Servers | Application Servers | <MyAppServer> | Message Listener Service | Custom Properties

  2. Click the New button.

  3. For name specify either:

    MQJMS.POOLING.THRESHOLD
    MQJMS.POOLING.TIMEOUT

  4. Enter the value you wish to use, and an optional description. Remember the time-out is in milliseconds.

  5. Press OK and save your configuration. The settings will come into operation the next time the appserver is restarted.

 Prev | Next

 

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.