summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java b/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java
index 6af39e3d1b..9c8cad4240 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java
@@ -68,13 +68,16 @@ public class BaseTransactionLog implements TransactionLog
_logger.info("Recording Enqueue of (" + messageId + ") on queue:" + queues);
}
- //list to hold which new queues to enqueue the message on
- ArrayList<AMQQueue> toEnqueueList = new ArrayList<AMQQueue>();
+ //variable to hold which new queues to enqueue the message on
+ ArrayList<AMQQueue> toEnqueueList = null;
List<AMQQueue> enqueuedList = _idToQueues.get(messageId);
if (enqueuedList != null)
{
//There are previous enqueues for this messageId
+ //create new empty list to hold additions
+ toEnqueueList = new ArrayList<AMQQueue>();
+
synchronized (enqueuedList)
{
for(AMQQueue queue : queues)