From e024efcccde28ec6ad863cc4d1ad1df7e105905c Mon Sep 17 00:00:00 2001 From: yang wei Date: Wed, 31 Oct 2018 10:02:11 +0800 Subject: [PATCH] ARTEMIS-2158 don't get pagedMessage if it's nontransactional --- .../artemis/core/paging/cursor/PagedReferenceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java index 1534d05c38..5fd0a296e1 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java @@ -68,7 +68,7 @@ public class PagedReferenceImpl extends LinkedListImpl.Node private static final byte UNDEFINED_IS_LARGE_MESSAGE = 2; private byte largeMessage; - private long transactionID = -1; + private long transactionID = -2; private long messageID = -1; @@ -125,7 +125,7 @@ public class PagedReferenceImpl extends LinkedListImpl.Node getPersistentSize(); } else { this.largeMessage = UNDEFINED_IS_LARGE_MESSAGE; - this.transactionID = -1; + this.transactionID = -2; this.messageID = -1; this.messageSize = -1; } @@ -318,7 +318,7 @@ public class PagedReferenceImpl extends LinkedListImpl.Node @Override public long getTransactionID() { - if (transactionID < 0) { + if (transactionID < -1) { transactionID = getPagedMessage().getTransactionID(); } return transactionID;