[jboss-user] [JBoss Messaging] - Spring JmsTemplate questions

TheOverlord do-not-reply at jboss.com
Mon Jul 21 15:33:02 EDT 2008

First I'll describe my configuration.

I'm sending a message from a JBoss AS to a remote queue on another JBoss AS using Spring's infamous JmsTemplate to send the message.

I read the advice concerning the use of Spring's JmsTemplate but I inherited this code so i'm hesitant to remove all references to JmsTemplate.

I read that I can use Spring's SingleConnectionFactory to reuse the JMS connection.

I have some question about this though.

It's my understanding that a single QueueConnectionFactory can be shared among different threads - is that correct?

It's also my understanding that a single connection created from a QueueConnectionFactory can be shared by multiple threads - is that correct?

If that is all correct, then why do I keep on reading about JMS connection pooling if the connection can be shared ? If they can be shared, you don't need a pool,  you just need one connection - right?

I think I'm not understanding something correctly.

Please enlighten me.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165735#4165735

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165735

More information about the jboss-user mailing list