git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@685971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-08-14 17:43:07 +00:00
parent 529e5c2231
commit f405a7e80d
1 changed files with 6 additions and 16 deletions

View File

@ -241,24 +241,12 @@ public class Queue extends BaseDestination implements Task {
((QueueBrowserSubscription)sub).incrementQueueRef();
}
// System.out.println(new Date()+": Locked pagedInMessages: "+sub.getConsumerInfo().getConsumerId());
// // Add all the matching messages in the queue to the
// // subscription.
//
// for (QueueMessageReference node:pagedInMessages.values()){
// if (!node.isDropped() && !node.isAcked() && (!node.isDropped() ||sub.getConsumerInfo().isBrowser())) {
// msgContext.setMessageReference(node);
// if (sub.matches(node, msgContext)) {
// sub.add(node);
// }
// }
// }
//
// }
wakeup();
}finally {
dispatchLock.unlock();
}
// Outside of dispatchLock() to maintain the lock hierarchy of
// iteratingMutex -> dispatchLock. - see https://issues.apache.org/activemq/browse/AMQ-1878
wakeup();
}
public void removeSubscription(ConnectionContext context, Subscription sub)
@ -312,10 +300,12 @@ public class Queue extends BaseDestination implements Task {
if (consumers.isEmpty()) {
messages.gc();
}
wakeup();
}finally {
dispatchLock.unlock();
}
// Outside of dispatchLock() to maintain the lock hierarchy of
// iteratingMutex -> dispatchLock. - see https://issues.apache.org/activemq/browse/AMQ-1878
wakeup();
}
public void send(final ProducerBrokerExchange producerExchange, final Message message) throws Exception {