You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/10/08 20:46:32 UTC
[1/3] activemq-artemis git commit: ARTEMIS-244 - fixed property name
Repository: activemq-artemis
Updated Branches:
refs/heads/master 4eb669f03 -> e30b983b9
ARTEMIS-244 - fixed property name
https://issues.apache.org/jira/browse/ARTEMIS-244
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/35ab56fd
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/35ab56fd
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/35ab56fd
Branch: refs/heads/master
Commit: 35ab56fd91e1d88e967da1c2ee4df4c3f2e43a45
Parents: 38a809f
Author: Andy Taylor <an...@gmail.com>
Authored: Tue Oct 6 14:47:34 2015 +0100
Committer: Andy Taylor <an...@gmail.com>
Committed: Thu Oct 8 12:15:21 2015 +0100
----------------------------------------------------------------------
.../artemis/core/server/cluster/ha/ColocatedHAManager.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/35ab56fd/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
index 4758a11..f3b6f22 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
@@ -280,9 +280,10 @@ public class ColocatedHAManager implements HAManager {
integer += portOffset;
params.put("port", integer.toString());
}
- Object serverId = params.get("server-id");
+ Object serverId = params.get("serverId");
if (serverId != null) {
- params.put("server-id", serverId.toString() + "(" + name + ")");
+ Integer newid = Integer.parseInt(serverId.toString()) + portOffset;
+ params.put("serverId", newid.toString());
}
}
}
[3/3] activemq-artemis git commit: This closes #190
Posted by cl...@apache.org.
This closes #190
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e30b983b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e30b983b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e30b983b
Branch: refs/heads/master
Commit: e30b983b97138b8e2cdd2bd8a940f07de92b3d29
Parents: 4eb669f 35ab56f
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu Oct 8 14:46:12 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Oct 8 14:46:12 2015 -0400
----------------------------------------------------------------------
.../server/cluster/ha/ColocatedHAManager.java | 5 ++--
.../core/server/cluster/ha/ReplicaPolicy.java | 28 ++++++++++++++++++--
.../server/cluster/ha/ReplicatedPolicy.java | 11 ++++++--
.../cluster/ha/SharedStoreSlavePolicy.java | 4 ++-
4 files changed, 41 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
[2/3] activemq-artemis git commit: ARTEMIS-243 - fix possible null
pointer
Posted by cl...@apache.org.
ARTEMIS-243 - fix possible null pointer
https://issues.apache.org/jira/browse/ARTEMIS-243
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/38a809fd
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/38a809fd
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/38a809fd
Branch: refs/heads/master
Commit: 38a809fded4384d46b23096f66695111a611a0cb
Parents: 4eb669f
Author: Andy Taylor <an...@gmail.com>
Authored: Tue Oct 6 12:49:12 2015 +0100
Committer: Andy Taylor <an...@gmail.com>
Committed: Thu Oct 8 12:15:21 2015 +0100
----------------------------------------------------------------------
.../core/server/cluster/ha/ReplicaPolicy.java | 28 ++++++++++++++++++--
.../server/cluster/ha/ReplicatedPolicy.java | 11 ++++++--
.../cluster/ha/SharedStoreSlavePolicy.java | 4 ++-
3 files changed, 38 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/38a809fd/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
index 2858d93..6ec85b4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java
@@ -33,6 +33,11 @@ public class ReplicaPolicy extends BackupPolicy {
private boolean restartBackup = ActiveMQDefaultConfiguration.isDefaultRestartBackup();
+ //used if we create a replicated policy for when we become live.
+ private boolean allowFailback = ActiveMQDefaultConfiguration.isDefaultAllowAutoFailback();
+
+ private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay();
+
private ReplicatedPolicy replicatedPolicy;
public ReplicaPolicy() {
@@ -49,9 +54,9 @@ public class ReplicaPolicy extends BackupPolicy {
this.maxSavedReplicatedJournalsSize = maxSavedReplicatedJournalsSize;
this.groupName = groupName;
this.restartBackup = restartBackup;
+ this.allowFailback = allowFailback;
+ this.failbackDelay = failbackDelay;
this.scaleDownPolicy = scaleDownPolicy;
- //todo check default settings
- replicatedPolicy = new ReplicatedPolicy(false, allowFailback, failbackDelay, groupName, clusterName, this);
}
public ReplicaPolicy(String clusterName,
@@ -81,6 +86,9 @@ public class ReplicaPolicy extends BackupPolicy {
}
public ReplicatedPolicy getReplicatedPolicy() {
+ if (replicatedPolicy == null) {
+ replicatedPolicy = new ReplicatedPolicy(false, allowFailback, failbackDelay, groupName, clusterName, this);
+ }
return replicatedPolicy;
}
@@ -121,6 +129,22 @@ public class ReplicaPolicy extends BackupPolicy {
return scaleDownPolicy != null;
}
+ public boolean isAllowFailback() {
+ return allowFailback;
+ }
+
+ public void setAllowFailback(boolean allowFailback) {
+ this.allowFailback = allowFailback;
+ }
+
+ public long getFailbackDelay() {
+ return failbackDelay;
+ }
+
+ public void setFailbackDelay(long failbackDelay) {
+ this.failbackDelay = failbackDelay;
+ }
+
@Override
public Activation createActivation(ActiveMQServerImpl server,
boolean wasLive,
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/38a809fd/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
index 4cd3e81..85fde90 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java
@@ -40,11 +40,12 @@ public class ReplicatedPolicy implements HAPolicy<LiveActivation> {
private long failbackDelay = ActiveMQDefaultConfiguration.getDefaultFailbackDelay();
/*
- * this is used as the policy when the server is started after a failover
+ * this are only used as the policy when the server is started as a live after a failover
* */
private ReplicaPolicy replicaPolicy;
public ReplicatedPolicy() {
+ replicaPolicy = new ReplicaPolicy(clusterName, -1, groupName, this);
}
public ReplicatedPolicy(boolean checkForLiveServer, String groupName, String clusterName) {
@@ -54,7 +55,6 @@ public class ReplicatedPolicy implements HAPolicy<LiveActivation> {
/*
* we create this with sensible defaults in case we start after a failover
* */
- replicaPolicy = new ReplicaPolicy(clusterName, -1, groupName, this);
}
public ReplicatedPolicy(boolean checkForLiveServer,
@@ -100,6 +100,9 @@ public class ReplicatedPolicy implements HAPolicy<LiveActivation> {
}
public ReplicaPolicy getReplicaPolicy() {
+ if (replicaPolicy == null) {
+ replicaPolicy = new ReplicaPolicy(clusterName, -1, groupName, this);
+ }
return replicaPolicy;
}
@@ -147,6 +150,10 @@ public class ReplicatedPolicy implements HAPolicy<LiveActivation> {
return null;
}
+ public void setAllowAutoFailBack(boolean allowAutoFailBack) {
+ this.allowAutoFailBack = allowAutoFailBack;
+ }
+
@Override
public LiveActivation createActivation(ActiveMQServerImpl server,
boolean wasLive,
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/38a809fd/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/SharedStoreSlavePolicy.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/SharedStoreSlavePolicy.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/SharedStoreSlavePolicy.java
index 259d38a..7f2693c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/SharedStoreSlavePolicy.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/SharedStoreSlavePolicy.java
@@ -47,7 +47,6 @@ public class SharedStoreSlavePolicy extends BackupPolicy {
this.restartBackup = restartBackup;
this.allowAutoFailBack = allowAutoFailBack;
this.scaleDownPolicy = scaleDownPolicy;
- sharedStoreMasterPolicy = new SharedStoreMasterPolicy(failbackDelay, failoverOnServerShutdown);
}
public long getFailbackDelay() {
@@ -67,6 +66,9 @@ public class SharedStoreSlavePolicy extends BackupPolicy {
}
public SharedStoreMasterPolicy getSharedStoreMasterPolicy() {
+ if (sharedStoreMasterPolicy == null) {
+ sharedStoreMasterPolicy = new SharedStoreMasterPolicy(failbackDelay, failoverOnServerShutdown);
+ }
return sharedStoreMasterPolicy;
}