Description
The JmsPullPoint would be accessed by both the producer client and consumer client, currently the whole store(used by producer) and getMessages(used by consumer) method was synchronized. For some flow control scenario[1], the
producer.send(message);
in store method would be blocked if the jms queue exceed some certain size, in this case the getMessages method never get chance to be invoked to decrease the queue size which cause deadlock.
Actually in the methods only the session init and reset should be synchronized, so we should synchronize the session only to avoid this deadlock
[1]http://activemq.apache.org/producer-flow-control.html