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