mirror of https://github.com/apache/activemq.git
AMQ-984, add isSlave jmx attribute to broker mbean
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@693414 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db4ed3fb35
commit
a38e372ef4
|
@ -150,6 +150,10 @@ public class BrokerView implements BrokerViewMBean {
|
|||
public boolean isPersistent() {
|
||||
return brokerService.isPersistent();
|
||||
}
|
||||
|
||||
public boolean isSlave() {
|
||||
return brokerService.isSlave();
|
||||
}
|
||||
|
||||
public void terminateJVM(int exitCode) {
|
||||
System.exit(exitCode);
|
||||
|
|
|
@ -80,6 +80,8 @@ public interface BrokerViewMBean extends Service {
|
|||
void setTempLimit(long limit);
|
||||
|
||||
boolean isPersistent();
|
||||
|
||||
boolean isSlave();
|
||||
|
||||
/**
|
||||
* Shuts down the JVM.
|
||||
|
|
|
@ -424,6 +424,7 @@ public class MBeanTest extends EmbeddedBrokerTestSupport {
|
|||
ObjectName brokerName = assertRegisteredObjectName(domain + ":Type=Broker,BrokerName=localhost");
|
||||
BrokerViewMBean broker = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
|
||||
|
||||
assertTrue("broker is not a slave", !broker.isSlave());
|
||||
// create 2 topics
|
||||
broker.addTopic(getDestinationString() + "1");
|
||||
broker.addTopic(getDestinationString() + "2");
|
||||
|
|
Loading…
Reference in New Issue