You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2016/11/22 08:06:58 UTC

[jira] [Created] (CXF-7145) synchronized store and getMessages of JmsPullPoint would cause deadlock

Freeman Fang created CXF-7145:
---------------------------------

             Summary: synchronized store and getMessages of JmsPullPoint would cause deadlock
                 Key: CXF-7145
                 URL: https://issues.apache.org/jira/browse/CXF-7145
             Project: CXF
          Issue Type: Bug
          Components: Services
            Reporter: Freeman Fang


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 
{code}
producer.send(message);
{code}
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 is critical resource which should be synchronized, so we should synchronize the session only to avoid this deadlock

[1]http://activemq.apache.org/producer-flow-control.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)