Tomcat has a built-in JDBC connection pool, but unfortunately there is no built-in JMS connection pool.
We are migrating an outdated Tomcat web application from WebSphere MQ version 6-7. Unfortunately, the connection pool has been deleted in WebSphere MQ 7, as described here: http://www-01.ibm.com/support/docview.wss?uid=swg21665128
Now we are afraid that we will have problems if we simply use the following code to configure MQ in Tomcat:
<Resource name="jms/XXXQCF" auth="Container" type="com.ibm.mq.jms.MQQueueConnectionFactory" factory="com.ibm.mq.jms.MQQueueConnectionFactoryFactory" description="JMS Queue Connection Factory" HOST="xxx.com" PORT="1429" CHAN="XXX" TRAN="1" QMGR="XXX" />
The reason for our concern is that when using MQ 7 it will not use a unified JMS provider. See http://activemq.apache.org/jmstemplate-gotchas.html for more details.
Alternative solutions we see:
1) Using Atomikos
Atomikos has com.atomikos.jms.AtomikosConnectionFactoryBean, which can be used instead of MQQueueConnectionFactory But using the XA transaction manager is a huge overhead when we don't need XA
2) Use Spring CachingConnectionFactory
Looks like a good solution, but unfortunately our legacy application does not use Spring. Therefore, we assume that using a CachingConnectionFactory will mean very little effort.
3) Using Apache Commons Pool
looks promising, but for its proper implementation for JMS some good JMS knowledge is required
Our questions:
- Is there a JMS provider that can be used to migrate the MQQueueConnectionFactory and which will combine connections, sessions, manufacturers and consumers?
- Has anyone succeeded in implementing one of the alternative solutions described above?
source share