activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r587033 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region: ./ cursors/
Date Mon, 22 Oct 2007 08:38:22 GMT
Author: rajdavies
Date: Mon Oct 22 01:38:22 2007
New Revision: 587033

URL: http://svn.apache.org/viewvc?rev=587033&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1449

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java?rev=587033&r1=587032&r2=587033&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/DurableTopicSubscription.java
Mon Oct 22 01:38:22 2007
@@ -128,7 +128,7 @@
             } else {
                 redeliveredMessages.put(node.getMessageId(), Integer.valueOf(1));
             }
-            if (keepDurableSubsActive) {
+            if (keepDurableSubsActive&& pending.isTransient()) {
                 synchronized (pending) {
                     pending.addMessageFirst(node);
                 }
@@ -137,7 +137,7 @@
             }
             iter.remove();
         }
-        if (!keepDurableSubsActive) {
+        if (!keepDurableSubsActive && pending.isTransient()) {
             synchronized (pending) {
                 try {
                     pending.reset();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java?rev=587033&r1=587032&r2=587033&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java
Mon Oct 22 01:38:22 2007
@@ -234,6 +234,10 @@
             audit= new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
         }
     }
+    
+    public boolean isTransient() {
+        return false;
+    }
 
 
     protected synchronized boolean  isDuplicate(MessageId messageId) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java?rev=587033&r1=587032&r2=587033&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
Mon Oct 22 01:38:22 2007
@@ -280,6 +280,10 @@
             }
         }
     }
+    
+    public boolean isTransient() {
+        return true;
+    }
 
     protected boolean isSpaceInMemoryList() {
         return hasSpace() && isDiskListEmpty();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java?rev=587033&r1=587032&r2=587033&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/PendingMessageCursor.java
Mon Oct 22 01:38:22 2007
@@ -241,6 +241,12 @@
      * @param enableAudit the enableAudit to set
      */
     public void setEnableAudit(boolean enableAudit);
+    
+    /**
+     * @return true if the underlying state of this cursor 
+     * disappears when the broker shuts down
+     */
+    public boolean isTransient();
 
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java?rev=587033&r1=587032&r2=587033&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
Mon Oct 22 01:38:22 2007
@@ -142,4 +142,8 @@
     public LinkedList<MessageReference> pageInList(int maxItems) {
         return list;
     }
+    
+    public boolean isTransient() {
+        return true;
+    }
 }



Mime
View raw message