you are correct that (1) should be avoided.
regarding (2), When you are using 1 connection per producer are you creating a new session
per producer. JBM2 will share connections between sessions created by the same connection
factory, see
http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone....
JMs has no notion of pooling, A JMS producer should *not* be shared between application
threads, each should have its own. If you want to cut down on the number of producers
being used you can write your own send method and pool the producers your self, just make
sure your send method is synchronized on the producer being used.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243446#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...