We seem to be running into a deadlock condition caused by an ExceptionListener
We use a SingleConnectionFactory with reconnectOnException set to true. When an exception happens, the thread that's created to deal with it appears to get deadlocked, like so:
It appears to be waiting on a mutex for the MessageDispatchChannel - however, since it's a different thread, I don't understand why it should be assumed that it can get that mutex, since the consumer associated with that channel may be holding it.
The ExceptionListener thread appears to lock up the entire connection by synchronizing on the connectionMonitor in SingleConnectionFactory, which basically causes all other JMS threads to block when trying to send or receive. In the application, this condition appears to be unrecoverable.
I suspect that something is misconfigured on our side, but I can't figure out what - can anyone help?
We're using ActiveMQ 5.2.0 and Java 1.6.0_16. Not sure if any other configuration factors matter, but happy to provide.