summaryrefslogtreecommitdiff
path: root/qpid/java/broker
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2009-04-10 23:55:37 +0000
committerRobert Gemmell <robbie@apache.org>2009-04-10 23:55:37 +0000
commitdcb301530474a1b66f4f8939c58582c14868f586 (patch)
tree8c87cb341e938f88cb18a8b29c1c03e1c9beb613 /qpid/java/broker
parent6db558a7742bfb2eb9842c78acc36f68f29accaf (diff)
downloadqpid-python-dcb301530474a1b66f4f8939c58582c14868f586.tar.gz
QPID-1800: only create the new empty arraylist after checking for a previous enqueue list, as it often wont be required
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@764113 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker')
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java
index 6af39e3d1b..9c8cad4240 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java
+++ b/qpid/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)