The Information Center provides directions for enabling
WebSphere MQ JMS Connection Pooling by adding the following two custom
properties to an Application Server Message Listener configuration:
- mqjms.pooling.threshold
- mqjms.pooling.timeout
Default values:
- Threshold=10
- Timeout=300000
Things to consider when using MQ JMS with these two
properties:
- These preperties do NOT enable connection pooling, they
only alter behavior.
- These properties do not apply only to asynchronous
messaging. When MQ JMS connection pooling is enabled, it is set for the
entire JVM™ and so is applicable to all JMS applications on the
Application Server.
- JCA connection pooling and MQ JMS pooling are two
different things. Read the WebSphere MQ Using Java manual (SC3406066-01) for
more information about native MQ JMS connection pooling. This publication
explains native MQ JMS connection pooling. Locate connection
pooling in the index. This section describes how to create an
MQSimpleConnectionManager, which is what the WebSphere Application Server
MessageListenerService is doing under the covers with the "timeout" and
"threshold" parameters.
- To disable connection pooling, specify a timeout of "0".
- WebSphere MQ Queue Connection Factories in Application
Server V5.x releases use both a connection pool and a session pool
parameter for each configuration.
For example, if you configure 10 connections, each with 10 sessions, a
total of 100 sessions are available.
- JMS connection pooling is identical to Data Source
pooling, as both use the J2EE Connector Architecture (JCA) connection
pooling. The createQueueConnection() method will obtain a Queue connection
from the pool if one is available.
|