Author: dejanb
Date: Thu Mar 25 10:07:53 2010
New Revision: 927324
URL: http://svn.apache.org/viewvc?rev=927324&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2669 - jmx slave attribute for
shared filesystem (jdbc) MS configurations
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=927324&r1=927323&r2=927324&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Thu Mar 25 10:07:53 2010
@@ -188,6 +188,8 @@ public class BrokerService implements Se
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 Se
*/
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 Se
deleteAllMessages();
}
getPersistenceAdapter().start();
+ slave = false;
startDestinations();
addShutdownHook();
getBroker().start();
@@ -559,6 +563,7 @@ public class BrokerService implements Se
tempDataStore.stop();
}
stopper.stop(persistenceAdapter);
+ slave = true;
if (isUseJmx()) {
stopper.stop(getManagementContext());
}