[jboss-user] [JBoss Messaging] - Re: All messages are not persisted in Database.

timfox do-not-reply at jboss.com
Tue Aug 5 04:02:57 EDT 2008


There are two other problems with your code I can see after a quick perusal:

1) You're starting your threads but not waiting for them to complete before exiting. You need to add calls to Thread::join() to make sure you wait until they complete or your program will exit before they are done

2) JMS sessions are *single threaded* see JMS spec. It is illegal to use a particular JMS session concurrently by more than one thread. Your publisher threads are using the same session.

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

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



More information about the jboss-user mailing list