If you set the flag to false after calling deliver, then there's a possibility deliver
will never get called, and messages not delivered.
Thread 1 calls deliverasync
Delivery thread delivers message
Thread 2 adds message to queue
Thread2 calls deliverasync
Already delivering so thread 2 call to deliver is ignored
Delivery thread sets flag to false
==> Message gets "stuck" in queue.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175276#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...