We are working on an IBM WebSphere MQ application, and we use JMS API to operate the message. But we have a problem that the connection takes too much time, and we want to pool the JMS connection, for it's a standalone application, we have no application container to provide JNDI or pooling service. So is there a solution to resolve this? For JDBC we can use DBCP or c3p0 to archive pooling datasource, in JMS, is there any similar project that can pool JMS connections?
pool. A JMS provider which pools Connection, Session and MessageProducer instances so it can be used with tools like Spring's JmsTemplate.
Connection pooling means that connections are reused rather than created each time a connection is requested. To facilitate connection reuse, a memory cache of database connections, called a connection pool, is maintained by a connection pooling module as a layer on top of any standard JDBC driver product.
A JMS queue connection factory is used to create connections to JMS destinations. When an application needs a JMS queue connection, an instance can be created by the factory for the JMS provider that is named in the Provider column of the list. This type of connection factory is for applications that use the JMS 1.0.
It used to be that the JMS MQConnectionFactory had pooling built in, but it seems that in version 7, it has been removed.
Set the use of ConnectionPooling in earlier versions of the WebSphere MQ classes for JMS. This method is retained for compatibility with older MQJMS applications, but, because this Connection Pooling functionality has been removed from version 7, setting this property will have no effect.
In the absence of anything else, you can use Apache Commons Pool. Same idea as DBCP (which uses Pool) but for non JDBC objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With