From c48c23f47c9c0f93a215fea2bfa31110e21575c3 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Wed, 1 Oct 2008 16:15:53 +0000 Subject: [PATCH] AMQ-1950 - fix for slave hang with temp queue creation/deletion git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@700823 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/broker/region/Queue.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java index 91c9e5263b..830dd22f07 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -245,13 +245,13 @@ public class Queue extends BaseDestination implements Task { 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 @@ public class Queue extends BaseDestination implements Task { 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();