From 0deda2501d2edc3d6de0ba57e84c5335e64dc4cb Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Wed, 15 May 2013 12:44:13 +0000 Subject: [PATCH] Fixing regression in last commit. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1482794 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/broker/region/Queue.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java index 7e1e4c580c..79cf093d28 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -797,15 +797,24 @@ public class Queue extends BaseDestination implements Task, UsageListener { } // do the ordered work if (!orderedWork.isEmpty()) { + + ArrayList syncs = new ArrayList(orderedWork.size());; sendLock.lockInterruptibly(); + try { for (Transaction tx : orderedWork) { - sendSyncs.get(tx).processSend(); + SendSync sync = sendSyncs.get(tx); + sync.processSend(); + syncs.add(sync); sendSyncs.remove(tx); } } finally { sendLock.unlock(); } + + for (SendSync sync : syncs) { + sync.processSent(); + } } }