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:
Bosanac Dejan 2010-03-25 10:07:53 +00:00
parent 146970965a
commit 73338477ad
1 changed files with 6 additions and 1 deletions

View File

@ -188,6 +188,8 @@ public class BrokerService implements Service {
private IOExceptionHandler ioExceptionHandler;
private boolean schedulerSupport = true;
private File schedulerDirectoryFile;
private boolean slave = true;
static {
String localHostName = "localhost";
@ -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());
}