mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@813980 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7eac1f7132
commit
7da608c411
|
@ -465,7 +465,7 @@ public class BrokerService implements Service {
|
|||
service.start();
|
||||
}
|
||||
}
|
||||
if (!isSlave()) {
|
||||
if (!isSlave() && (this.masterConnector == null || isShutdownOnMasterFailure() == false)) {
|
||||
startAllConnectors();
|
||||
}
|
||||
if (!stopped.get()) {
|
||||
|
|
|
@ -74,6 +74,7 @@ public class MasterConnector implements Service, BrokerServiceAware {
|
|||
private final AtomicBoolean masterActive = new AtomicBoolean();
|
||||
private BrokerInfo brokerInfo;
|
||||
private boolean firstConnection=true;
|
||||
private boolean failedToStart;
|
||||
|
||||
public MasterConnector() {
|
||||
}
|
||||
|
@ -185,6 +186,7 @@ public class MasterConnector implements Service, BrokerServiceAware {
|
|||
}else{
|
||||
LOG.info("Slave stopped before connected to the master.");
|
||||
}
|
||||
setFailedToStart(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,4 +350,20 @@ public class MasterConnector implements Service, BrokerServiceAware {
|
|||
return stoppedBeforeStart.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the failedToStart
|
||||
* @return the failedToStart
|
||||
*/
|
||||
public boolean isFailedToStart() {
|
||||
return this.failedToStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the failedToStart
|
||||
* @param failedToStart the failedToStart to set
|
||||
*/
|
||||
public void setFailedToStart(boolean failedToStart) {
|
||||
this.failedToStart = failedToStart;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue