activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1042272 - /activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
Date Sun, 05 Dec 2010 01:04:05 GMT
Author: tabish
Date: Sun Dec  5 01:04:05 2010
New Revision: 1042272

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

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp?rev=1042272&r1=1042271&r2=1042272&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
Sun Dec  5 01:04:05 2010
@@ -121,12 +121,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