Well the solution was breaking the deadlock, which is application specific. As long as the
QueueConnection could be reestablished, the deadlock would be broken.
We stopped implementing message receive as a MessageListener and did it ourselves. This
had the effect that we could control when receive() was called and how long it would block
for. If onException() was called, we could set a flag in the receive thread. The receive
thread would eventually return from receive() and close it's QueueSession object. So
QueueConnection.close() always works. Then we reestablish the QueueConnection and the
deadlock is cleared.
(The deadlock had to do with two threads. Thread A wanted to add a message to a data
structure but had to wait() because it was currently full. Thread B wanted to read from
this data structure but would first wait() on the same monitor if there was no valid
QueueConnection.)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033224#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...