From 60906e375421a0f51cd568f7da205a127f6828ab Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Mon, 11 May 2015 13:22:09 +0100 Subject: [PATCH] ACTIVEMQ6-102 - fix check for scaledown when creating journal loader https://issues.apache.org/jira/browse/ACTIVEMQ6-102 --- .../artemis/core/server/impl/SharedNothingBackupActivation.java | 2 +- .../artemis/core/server/impl/SharedStoreBackupActivation.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java index 7d081fa653..e8013f0213 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java @@ -339,7 +339,7 @@ public final class SharedNothingBackupActivation extends Activation @Override public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, ActiveMQServer parentServer) throws ActiveMQException { - if (replicaPolicy.getScaleDownPolicy() != null) + if (replicaPolicy.getScaleDownPolicy() != null && replicaPolicy.getScaleDownPolicy().isEnabled()) { return new BackupRecoveryJournalLoader(postOffice, pagingManager, diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java index 90b2f81054..ee6f2f3442 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java @@ -194,7 +194,7 @@ public final class SharedStoreBackupActivation extends Activation @Override public JournalLoader createJournalLoader(PostOffice postOffice, PagingManager pagingManager, StorageManager storageManager, QueueFactory queueFactory, NodeManager nodeManager, ManagementService managementService, GroupingHandler groupingHandler, Configuration configuration, ActiveMQServer parentServer) throws ActiveMQException { - if (sharedStoreSlavePolicy.getScaleDownPolicy() != null) + if (sharedStoreSlavePolicy.getScaleDownPolicy() != null && sharedStoreSlavePolicy.getScaleDownPolicy().isEnabled()) { return new BackupRecoveryJournalLoader(postOffice, pagingManager,