svn commit: r700823 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java

View: New views
1 Messages — Rating Filter:   Alert me  

svn commit: r700823 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java

by gtully :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Author: gtully
Date: Wed Oct  1 09:15:53 2008
New Revision: 700823

URL: http://svn.apache.org/viewvc?rev=700823&view=rev
Log:
AMQ-1950 - fix for slave hang with temp queue creation/deletion

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=700823&r1=700822&r2=700823&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java Wed Oct  1 09:15:53 2008
@@ -245,13 +245,13 @@
             if( sub instanceof QueueBrowserSubscription ) {
                 ((QueueBrowserSubscription)sub).incrementQueueRef();
             }
-            if (!this.optimizedDispatch) {
+            if (!(this.optimizedDispatch || isSlave())) {
                 wakeup();
             }
         }finally {
             dispatchLock.unlock();
         }
-        if (this.optimizedDispatch) {
+        if (this.optimizedDispatch || isSlave()) {
             // Outside of dispatchLock() to maintain the lock hierarchy of
             // iteratingMutex -> dispatchLock. - see https://issues.apache.org/activemq/browse/AMQ-1878
             wakeup();
@@ -307,13 +307,13 @@
             if (consumers.isEmpty()) {
                 messages.gc();
             }
-            if (!this.optimizedDispatch) {
+            if (!(this.optimizedDispatch || isSlave())) {
                 wakeup();
             }
         }finally {
             dispatchLock.unlock();
         }
-        if (this.optimizedDispatch) {
+        if (this.optimizedDispatch || isSlave()) {
             // Outside of dispatchLock() to maintain the lock hierarchy of
             // iteratingMutex -> dispatchLock. - see https://issues.apache.org/activemq/browse/AMQ-1878
             wakeup();


LightInTheBox - Buy quality products at wholesale price!