activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r693414 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/broker/jmx/BrokerView.java main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java test/java/org/apache/activemq/broker/jmx/MBeanTest.java
Date Tue, 09 Sep 2008 10:05:33 GMT
Author: gtully
Date: Tue Sep  9 03:05:32 2008
New Revision: 693414

URL: http://svn.apache.org/viewvc?rev=693414&view=rev
Log:
AMQ-984, add isSlave jmx attribute to broker mbean

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java?rev=693414&r1=693413&r2=693414&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
Tue Sep  9 03:05:32 2008
@@ -150,6 +150,10 @@
     public boolean isPersistent() {
         return brokerService.isPersistent();
     }
+    
+    public boolean isSlave() {
+        return brokerService.isSlave();
+    }
 
     public void terminateJVM(int exitCode) {
         System.exit(exitCode);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java?rev=693414&r1=693413&r2=693414&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
Tue Sep  9 03:05:32 2008
@@ -80,6 +80,8 @@
     void setTempLimit(long limit);
     
     boolean isPersistent();
+    
+    boolean isSlave();
 
     /**
      * Shuts down the JVM.

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java?rev=693414&r1=693413&r2=693414&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
Tue Sep  9 03:05:32 2008
@@ -424,6 +424,7 @@
         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");



Mime
View raw message