activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1430252 - /activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
Date Tue, 08 Jan 2013 12:38:57 GMT
Author: dejanb
Date: Tue Jan  8 12:38:57 2013
New Revision: 1430252

URL: http://svn.apache.org/viewvc?rev=1430252&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-4237 - web console - connectors and connections

Modified:
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java?rev=1430252&r1=1430251&r2=1430252&view=diff
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
(original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
Tue Jan  8 12:38:57 2013
@@ -120,12 +120,12 @@ public abstract class BrokerFacadeSuppor
     @SuppressWarnings("unchecked")
     public Collection<String> getConnections(String connectorName) throws Exception
{
         String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Connection,ConnectorName=" + connectorName + ",Connection=*");
+        ObjectName query = new ObjectName("org.apache.activemq:type=Broker,brokerName=" +
brokerName
+                + ",connector=clientConnectors,connectorName=" + connectorName + ",connectionName=*");
         Set<ObjectName> queryResult = queryNames(query, null);
         Collection<String> result = new ArrayList<String>(queryResult.size());
         for (ObjectName on : queryResult) {
-            String name = StringUtils.replace(on.getKeyProperty("Connection"), "_", ":");
+            String name = StringUtils.replace(on.getKeyProperty("connectionName"), "_", ":");
             result.add(name);
         }
         return result;
@@ -135,8 +135,8 @@ public abstract class BrokerFacadeSuppor
     public ConnectionViewMBean getConnection(String connectionName) throws Exception {
         connectionName = StringUtils.replace(connectionName, ":", "_");
         String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Connection,*,Connection=" + connectionName);
+        ObjectName query = new ObjectName("org.apache.activemq:type=Broker,brokerName=" +
brokerName
+                + ",connector=clientConnectors,*,connectionName=" + connectionName);
         Set<ObjectName> queryResult = queryNames(query, null);
         if (queryResult.size() == 0)
             return null;
@@ -148,18 +148,18 @@ public abstract class BrokerFacadeSuppor
     @SuppressWarnings("unchecked")
     public Collection<String> getConnectors() throws Exception {
         String brokerName = getBrokerName();
-        ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
+ ",Type=Connector,*");
+        ObjectName query = new ObjectName("org.apache.activemq:type=Broker,brokerName=" +
brokerName + ",connector=clientConnectors,connectorName=*");
         Set<ObjectName> queryResult = queryNames(query, null);
         Collection<String> result = new ArrayList<String>(queryResult.size());
         for (ObjectName on : queryResult)
-            result.add(on.getKeyProperty("ConnectorName"));
+            result.add(on.getKeyProperty("connectorName"));
         return result;
     }
 
     public ConnectorViewMBean getConnector(String name) throws Exception {
         String brokerName = getBrokerName();
-        ObjectName objectName = new ObjectName("org.apache.activemq:BrokerName=" + brokerName
-                + ",Type=Connector,ConnectorName=" + name);
+        ObjectName objectName = new ObjectName("org.apache.activemq:type=Broker,brokerName="
+ brokerName
+                + ",connector=clientConnectors,connectorName=" + name);
         return (ConnectorViewMBean) newProxyInstance(objectName, ConnectorViewMBean.class,
true);
     }
 



Mime
View raw message