0

I have done some reading on JmsTemplate and by default open and closes each connection after sending and receiving a message. The sequence is:

open connection send/receive a message close connection

I have a scenario where the application reads many messages from a queue using the JmsTemplate.receiveSelected() and it takes forever.

I use the org.springframework.jms.connection.SingleConnectionFactory.

I then tried the org.springframework.jms.connection.CachingConnectionFactory and as it caches sessions, connections and producers it is super fast.

We deploy our app on Websphere and it takes care of setting up the JMS connection factory so we do not have to choose what connection factory to use to connect to a queue.

Is there a way to configure Websphere 7.0 to define a PooledConnectionFactory or CachingConnectionFactory from the Websphere admin console?

We develop using Java so maybe there is a way to disable the default JmsTemplate opening and closing of a connection; and instead open a connection read many messages from a queue and then close the connection e.g:

open connection

JmsTemplate.receiveSelected() <-Disable default open and close connection

close connection

Thanks

max
  • 53
  • 8
  • Then you asking connection factory to get connection from pool or create a new connection. If connection has closed it returns back to pool and lives in pool for configured about of time. – Anton N Feb 10 '15 at 02:10
  • IBM Tech Article about configuration Spring, Hibernate : http://www.ibm.com/developerworks/websphere/techjournal/0609_alcott/0609_alcott.html – Anton N Feb 10 '15 at 02:17

0 Answers0