activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1042271 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
Date Sun, 05 Dec 2010 01:02:12 GMT
Author: tabish
Date: Sun Dec  5 01:02:12 2010
New Revision: 1042271

URL: http://svn.apache.org/viewvc?rev=1042271&view=rev
Log:
Perform the dispatch outside the lock to avoid a deadlock on failover.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp?rev=1042271&r1=1042270&r2=1042271&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
Sun Dec  5 01:02:12 2010
@@ -130,12 +130,12 @@ void ActiveMQSessionExecutor::dispatch( 
             if( this->session->consumers.containsKey( dispatch->getConsumerId()
) ) {
                 consumer = this->session->consumers.get( dispatch->getConsumerId()
);
             }
+        }
 
-            // If the consumer is not available, just ignore the message.
-            // Otherwise, dispatch the message to the consumer.
-            if( consumer != NULL ) {
-                consumer->dispatch( dispatch );
-            }
+        // If the consumer is not available, just ignore the message.
+        // Otherwise, dispatch the message to the consumer.
+        if( consumer != NULL ) {
+            consumer->dispatch( dispatch );
         }
 
     } catch( decaf::lang::Exception& ex ) {



Mime
View raw message