From f2fc86405f68516fa1da6572bf25f60a1d7bbfe6 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Fri, 12 Sep 2008 19:24:55 +0000 Subject: [PATCH] Apply fix for https://issues.apache.org/activemq/browse/AMQ-1935 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@694781 13f79535-47bb-0310-9956-ffa450edef68 --- .../broker/region/cursors/AbstractPendingMessageCursor.java | 2 +- .../broker/region/cursors/FilePendingMessageCursor.java | 1 + .../broker/region/cursors/VMPendingMessageCursor.java | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java index 38070f181d..14e8f4120c 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractPendingMessageCursor.java @@ -41,7 +41,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor { protected int maxAuditDepth=1000; protected boolean enableAudit=true; protected ActiveMQMessageAudit audit; - protected boolean useCache=false; + protected boolean useCache=true; private boolean started=false; diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java index 00b6bca578..3d6d99c5de 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java @@ -65,6 +65,7 @@ public class FilePendingMessageCursor extends AbstractPendingMessageCursor imple * @param store */ public FilePendingMessageCursor(Broker broker,String name) { + this.useCache=false; this.broker = broker; //the store can be null if the BrokerService has persistence //turned off diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java index de1df3e399..83014f90c1 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java @@ -36,6 +36,10 @@ public class VMPendingMessageCursor extends AbstractPendingMessageCursor { private LinkedList list = new LinkedList(); private Iterator iter; private MessageReference last; + + public VMPendingMessageCursor(){ + this.useCache=false; + } @Override