ARTEMIS-3496 Replica connection to its live should fail fast

This commit is contained in:
franz1981 2021-09-24 09:00:43 +02:00 committed by Gary Tully
parent 95aa20b608
commit 1dc9d4f455
2 changed files with 2 additions and 2 deletions

View File

@ -566,7 +566,7 @@ public final class ReplicationBackupActivation extends Activation implements Dis
final ReplicationObserver liveObserver) {
ReplicationEndpoint replicationEndpoint = null;
try {
liveControl.getSessionFactory().setReconnectAttempts(1);
liveControl.getSessionFactory().setReconnectAttempts(0);
liveObserver.listenConnectionFailuresOf(liveControl.getSessionFactory());
liveControl.authorize();
replicationEndpoint = new ReplicationEndpoint(activeMQServer, policy.isTryFailback(), liveObserver);

View File

@ -498,7 +498,7 @@ public final class SharedNothingBackupActivation extends Activation implements R
public void run() {
try {
//we should only try once, if its not there we should move on.
clusterControl.getSessionFactory().setReconnectAttempts(1);
clusterControl.getSessionFactory().setReconnectAttempts(0);
backupQuorum.setSessionFactory(clusterControl.getSessionFactory());
//get the connection and request replication to live
clusterControl.authorize();