activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r1420092 - in /activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker: BrokerService.java jmx/StatusView.java jmx/StatusViewMBean.java
Date Tue, 11 Dec 2012 10:56:20 GMT
Author: jstrachan
Date: Tue Dec 11 10:56:19 2012
New Revision: 1420092

URL: http://svn.apache.org/viewvc?rev=1420092&view=rev
Log:
made minor update to the StatusView mbean to comply with these health mbean conventions  https://github.com/hawtio/hawtio/blob/master/doc/HealthMBeans.md#health-mbeans

Modified:
    activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusView.java
    activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusViewMBean.java

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=1420092&r1=1420091&r2=1420092&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
Tue Dec 11 10:56:19 2012
@@ -2079,7 +2079,7 @@ public class BrokerService implements Se
             try {
                 ObjectName objectName = new ObjectName(getManagementContext().getJmxDomainName()
+ ":"
                         + "BrokerName=" + JMXSupport.encodeObjectNamePart(getBrokerName())
+ ","
-                        + "Type=Status");
+                        + "Type=Health");
 
                 AnnotatedMBean.registerMBean(getManagementContext(), statusView, objectName);
             } catch (Throwable e) {

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusView.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusView.java?rev=1420092&r1=1420091&r2=1420092&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusView.java
(original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusView.java
Tue Dec 11 10:56:19 2012
@@ -35,13 +35,13 @@ public class StatusView implements Statu
     }
 
     @Override
-    public TabularData status() throws Exception {
+    public TabularData health() throws Exception {
         OpenTypeSupport.OpenTypeFactory factory = OpenTypeSupport.getFactory(StatusEvent.class);
         CompositeType ct = factory.getCompositeType();
         TabularType tt = new TabularType("Status", "Status", ct, new String[]{"id", "resource"});
         TabularDataSupport rc = new TabularDataSupport(tt);
 
-        List<StatusEvent> list = statusList();
+        List<StatusEvent> list = healthList();
         for (StatusEvent statusEvent : list) {
             rc.put(new CompositeDataSupport(ct, factory.getFields(statusEvent)));
         }
@@ -49,7 +49,7 @@ public class StatusView implements Statu
     }
 
     @Override
-    public List<StatusEvent> statusList() throws Exception {
+    public List<StatusEvent> healthList() throws Exception {
         List<StatusEvent> answer = new ArrayList<StatusEvent>();
         Map<ObjectName, DestinationView> queueViews = broker.getQueueViews();
         for (Map.Entry<ObjectName, DestinationView> entry : queueViews.entrySet())
{

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusViewMBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusViewMBean.java?rev=1420092&r1=1420091&r2=1420092&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusViewMBean.java
(original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/StatusViewMBean.java
Tue Dec 11 10:56:19 2012
@@ -24,7 +24,7 @@ import java.util.List;
  */
 public interface StatusViewMBean {
 
-    public TabularData status() throws Exception;
+    public TabularData health() throws Exception;
 
     /**
      * Warning this method can only be invoked if you have the correct version
@@ -33,5 +33,5 @@ public interface StatusViewMBean {
      *
      * If in doubt, please use the {@link #status()} method instead!
      */
-    List<StatusEvent> statusList() throws Exception;
+    List<StatusEvent> healthList() throws Exception;
 }



Mime
View raw message