0

we have scenario where the queue name is dynamically changed based on certain transaction,we will be using IBM mq for queueing.My question is that if I define the JmsTemplate as request scope bean which will allow modification of queue name dynamically for each request, will connection pooling mechanism work with JmsTemplate. we are using spring caching factory mechanism.

Please help on this.

M. Deinum
  • 115,695
  • 22
  • 220
  • 224
sriramdev
  • 759
  • 1
  • 5
  • 11
  • 2
    Why so complex... Just use the send methods that take a destination instead of relying on the default destination... NO need to mess around with scopes and aop... – M. Deinum Mar 24 '15 at 07:13
  • Thanks M. Deinum,Yes it would work i guess.probably i dont know how on earth i missed this. – sriramdev Mar 24 '15 at 07:19
  • M. Deinum, Also can u please enlighten me whether creating new jmstemplate object for will nullify connection pooling mechanism. – sriramdev Mar 24 '15 at 07:26
  • 2
    NO it won't nor should you be creating new `JmsTemplate` . Just create one and use that, the `JmsTemplate` is threadsafe so no need to construct new ones each time you need one. – M. Deinum Mar 24 '15 at 07:27

0 Answers0