mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2669 - jmx slave attribute for shared filesystem (jdbc) MS configurations
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@927324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
146970965a
commit
73338477ad
|
@ -189,6 +189,8 @@ public class BrokerService implements Service {
|
|||
private boolean schedulerSupport = true;
|
||||
private File schedulerDirectoryFile;
|
||||
|
||||
private boolean slave = true;
|
||||
|
||||
static {
|
||||
String localHostName = "localhost";
|
||||
try {
|
||||
|
@ -401,7 +403,8 @@ public class BrokerService implements Service {
|
|||
*/
|
||||
public boolean isSlave() {
|
||||
return (masterConnector != null && masterConnector.isSlave()) ||
|
||||
(masterConnector != null && masterConnector.isStoppedBeforeStart());
|
||||
(masterConnector != null && masterConnector.isStoppedBeforeStart()) ||
|
||||
(masterConnector == null && slave);
|
||||
}
|
||||
|
||||
public void masterFailed() {
|
||||
|
@ -467,6 +470,7 @@ public class BrokerService implements Service {
|
|||
deleteAllMessages();
|
||||
}
|
||||
getPersistenceAdapter().start();
|
||||
slave = false;
|
||||
startDestinations();
|
||||
addShutdownHook();
|
||||
getBroker().start();
|
||||
|
@ -559,6 +563,7 @@ public class BrokerService implements Service {
|
|||
tempDataStore.stop();
|
||||
}
|
||||
stopper.stop(persistenceAdapter);
|
||||
slave = true;
|
||||
if (isUseJmx()) {
|
||||
stopper.stop(getManagementContext());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue