From 7351c4bd0d0229750eba5bfccc380f04ce8c67db Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Sat, 30 Dec 2006 07:25:03 +0000 Subject: [PATCH] clear batch entry if no more messages in the container git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@491184 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/store/memory/MemoryMessageStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java b/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java index a54634d962..0684142546 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java @@ -77,7 +77,7 @@ public class MemoryMessageStore implements MessageStore{ public void removeMessage(MessageId msgId) throws IOException{ synchronized(messageTable){ messageTable.remove(msgId); - if(lastBatchId!=null && lastBatchId.equals(msgId)){ + if((lastBatchId!=null && lastBatchId.equals(msgId)) || messageTable.isEmpty()){ lastBatchId=null; } }