Repository: activemq-artemis Updated Branches: refs/heads/master 90273c92c -> 4cd7b1c65
ARTEMIS-1876 InVMNodeManager shouldn't be used if no JDBC HA is configured When database persistence and no shared store option is being used, Artemis is choosing to use InVMNodeManager, that is not providing the same behaviour of FileLockNodeManager. Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f886c0bd Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f886c0bd Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f886c0bd Branch: refs/heads/master Commit: f886c0bdb451c947143fba6cf07cbf8ce7f3ff4d Parents: 90273c9 Author: Francesco Nigro <nigro....@gmail.com> Authored: Tue May 22 09:35:48 2018 +0200 Committer: Francesco Nigro <nigro....@gmail.com> Committed: Tue May 22 09:35:48 2018 +0200 ---------------------------------------------------------------------- .../activemq/artemis/core/server/impl/ActiveMQServerImpl.java | 4 ++-- .../artemis/core/config/impl/HAPolicyConfigurationTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f886c0bd/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java index cb31b00..cb58a1a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java @@ -449,10 +449,10 @@ public class ActiveMQServerImpl implements ActiveMQServer { manager = JdbcNodeManager.with(dbConf, scheduledPool, executorFactory, shutdownOnCriticalIO); } else if (haType == null || haType == HAPolicyConfiguration.TYPE.LIVE_ONLY) { if (logger.isDebugEnabled()) { - logger.debug("Detected no Shared Store HA options on JDBC store: will use InVMNodeManager"); + logger.debug("Detected no Shared Store HA options on JDBC store"); } //LIVE_ONLY should be the default HA option when HA isn't configured - manager = new InVMNodeManager(replicatingBackup); + manager = new FileLockNodeManager(directory, replicatingBackup, configuration.getJournalLockAcquisitionTimeout()); } else { throw new IllegalArgumentException("JDBC persistence allows only Shared Store HA options"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f886c0bd/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java index 4d9bf75..2a23613 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java @@ -33,7 +33,7 @@ import org.apache.activemq.artemis.core.server.cluster.ha.SharedStoreSlavePolicy import org.apache.activemq.artemis.core.server.impl.Activation; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.artemis.core.server.impl.ColocatedActivation; -import org.apache.activemq.artemis.core.server.impl.InVMNodeManager; +import org.apache.activemq.artemis.core.server.impl.FileLockNodeManager; import org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation; import org.apache.activemq.artemis.core.server.impl.SharedNothingBackupActivation; import org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation; @@ -54,7 +54,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase { assertEquals(HAPolicyConfiguration.TYPE.LIVE_ONLY, server.getConfiguration().getHAPolicyConfiguration().getType()); try { server.start(); - assertThat(server.getNodeManager(), instanceOf(InVMNodeManager.class)); + assertThat(server.getNodeManager(), instanceOf(FileLockNodeManager.class)); } finally { server.stop(); }