From aa2a85abe582b8ae118aef8bfdf2cab9a098c727 Mon Sep 17 00:00:00 2001 From: gtully Date: Fri, 11 Dec 2015 15:27:28 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-6070 - rework regression - KahaDBStoreRecoveryExpiryTest had NPE in the logs, region dest not set on recovery listener for expiry case (cherry picked from commit 93092f7ea0e231cd7d615f8ee6420c9b73a5367f) --- .../main/java/org/apache/activemq/advisory/AdvisoryBroker.java | 2 +- .../src/main/java/org/apache/activemq/broker/region/Queue.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java b/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java index d7c9aa8fb3..8ad3bac09a 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java +++ b/activemq-broker/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java @@ -772,7 +772,7 @@ public class AdvisoryBroker extends BrokerFilter { private void handleFireFailure(String message, Throwable cause) { LOG.warn("Failed to fire {} advisory, reason: {}", message, cause); - LOG.debug("{} detail: {}", message, cause); + LOG.debug("{} detail: {}", message, cause, cause); } protected void fireAdvisory(ConnectionContext context, ActiveMQTopic topic, Command command) throws Exception { diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java index adc3a53aea..d447ebdc4d 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -286,12 +286,12 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index } // Message could have expired while it was being // loaded.. + message.setRegionDestination(Queue.this); if (message.isExpired() && broker.isExpired(message)) { toExpire.add(message); return true; } if (hasSpace()) { - message.setRegionDestination(Queue.this); messagesLock.writeLock().lock(); try { try {