0
votes

We are using jms outbound channel adapter to send messages coming to one channel. For that we are accessing connection factory and queue using jndi template. Both config are using cache=true in their config.

But what we have noticed is that, for every message it sends, a new connection is being created instead of using from cache.

I believe behind the scene this outbound channel adapter uses "JmsSendingMessageHandler " which internally use jms template to send the message.

Can someone throw some light on how can we cache weblogic jms connection?

1

1 Answers

0
votes

accessing connection factory and queue using jndi template

Caching in this context means caching the connection factory object, not its connection(s).

As long as you are not using JTA transactions, you can wrap the CF you obtain from JNDI into a CachingConnectionFactory. With JTA, the app server might need you to get a new connection for each TX and you will need to configure caching in the app server (if available).