Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

How to implement connection pooling using Rule-Connect-MQ

SA-4491

Summary



How to implement connection pooling using Rule-Connect-MQ.

Resolution



1. Create an activity @baseclass.startMQPool. Add one java step and put in the following code:

synchronized (com.ibm.mq.MQEnvironment.class) {
   oLog.infoForced("Creating connection pool first time");
   com.ibm.mq.MQSimpleConnectionManager connMan
        = new com.ibm.mq.MQSimpleConnectionManager();
 
  connMan.setActive(com.ibm.mq.MQSimpleConnectionManager.MODE_ACTIVE);
  connMan.setTimeout(3600000);
  connMan.setMaxConnections(50);
  connMan.setMaxUnusedConnections(50);
  com.ibm.mq.MQEnvironment.setDefaultConnectionManager(connMan);
}
 
The setTimeOut, setMaxConnections and setMaxUnusedConnections need to be set based on the implementation needs.
 
2. Create a new Rule-Agent-Queue instance called MQConnectionPool.
 
3. Schedule one activity @baseclass.startMQPool and set the pattern to "Periodic" and the interval to a very large number, like 4000000.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us