You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2017/03/10 03:20:16 UTC
[3/6] activemq-artemis git commit: ARTEMIS-1029 Fixing Scaledown tests
ARTEMIS-1029 Fixing Scaledown tests
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/761f4227
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/761f4227
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/761f4227
Branch: refs/heads/master
Commit: 761f42277d33aeaf6505ccf00feaaa11fcfd3d0f
Parents: 5534d00
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu Mar 9 21:42:54 2017 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Mar 9 22:12:58 2017 -0500
----------------------------------------------------------------------
.../artemis/core/server/cluster/ClusterController.java | 12 +++++++++---
.../artemis/core/server/cluster/ClusterManager.java | 4 +---
2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/761f4227/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java
index b47dca9..98b550e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java
@@ -109,9 +109,15 @@ public class ClusterController implements ActiveMQComponent {
//latch so we know once we are connected
replicationClusterConnectedLatch = new CountDownLatch(1);
//and add the quorum manager as a topology listener
- defaultLocator.addClusterTopologyListener(quorumManager);
- //start the quorum manager
- quorumManager.start();
+ if (defaultLocator != null) {
+ defaultLocator.addClusterTopologyListener(quorumManager);
+ }
+
+ if (quorumManager != null) {
+ //start the quorum manager
+ quorumManager.start();
+ }
+
started = true;
//connect all the locators in a separate thread
for (ServerLocatorInternal serverLocatorInternal : locators.values()) {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/761f4227/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
index 7d0faba..d2219c2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
@@ -247,9 +247,7 @@ public final class ClusterManager implements ActiveMQComponent {
/*
* only start if we are actually in a cluster
* */
- if (clusterConnections.size() > 0) {
- clusterController.start();
- }
+ clusterController.start();
}
@Override