activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r491184 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java
Date Sat, 30 Dec 2006 07:25:06 GMT
Author: rajdavies
Date: Fri Dec 29 23:25:03 2006
New Revision: 491184

URL: http://svn.apache.org/viewvc?view=rev&rev=491184
Log:
clear batch entry if no more messages in the container

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java?view=diff&rev=491184&r1=491183&r2=491184
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java
Fri Dec 29 23:25:03 2006
@@ -77,7 +77,7 @@
     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;
             }
         }



Mime
View raw message