activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r392043 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker: BrokerService.java jmx/ManagedTransportConnection.java
Date Thu, 06 Apr 2006 19:15:32 GMT
Author: chirino
Date: Thu Apr  6 12:15:29 2006
New Revision: 392043

URL: http://svn.apache.org/viewcvs?rev=392043&view=rev
Log:
Group the connections using the connector name that they were created from.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=392043&r1=392042&r2=392043&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Thu Apr  6 12:15:29 2006
@@ -773,16 +773,10 @@
         
     }
 
-    protected void registerConnectorMBean(TransportConnector connector) throws IOException,
URISyntaxException {
+    protected void registerConnectorMBean(TransportConnector connector, ObjectName objectName)
throws IOException, URISyntaxException {
         MBeanServer mbeanServer = getManagementContext().getMBeanServer();
         ConnectorViewMBean view = new ConnectorView(connector);
         try {
-        	ObjectName objectName = new ObjectName(
-            		managementContext.getJmxDomainName()+":"+
-            		"BrokerName="+JMXSupport.encodeObjectNamePart(getBrokerName())+","+
-            		"Type=Connector,"+
-            		"ConnectorName="+JMXSupport.encodeObjectNamePart(connector.getName())
-            		);
             mbeanServer.registerMBean(view, objectName);
             registeredMBeanNames.add(objectName);
         }
@@ -1088,8 +1082,16 @@
         }
         
         if (isUseJmx()) {
-            connector = connector.asManagedConnector(getManagementContext().getMBeanServer(),
getBrokerObjectName());
-            registerConnectorMBean(connector);
+            
+            ObjectName objectName = new ObjectName(
+                    managementContext.getJmxDomainName()+":"+
+                    "BrokerName="+JMXSupport.encodeObjectNamePart(getBrokerName())+","+
+                    "Type=Connector,"+
+                    "ConnectorName="+JMXSupport.encodeObjectNamePart(connector.getName())
+                    );
+            
+            connector = connector.asManagedConnector(getManagementContext().getMBeanServer(),
objectName);
+            registerConnectorMBean(connector, objectName);
         }        
         connector.start();
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java?rev=392043&r1=392042&r2=392043&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTransportConnection.java
Thu Apr  6 12:15:29 2006
@@ -117,8 +117,9 @@
         try {
             return new ObjectName(
             		connectorName.getDomain()+":"+
-            		"BrokerName="+map.get("BrokerName")+","+
+            		"BrokerName="+JMXSupport.encodeObjectNamePart((String) map.get("BrokerName"))+","+
             		"Type=Connection,"+
+                    "ConnectorName="+JMXSupport.encodeObjectNamePart((String) map.get("ConnectorName"))+","+
             		"Connection="+JMXSupport.encodeObjectNamePart(connectionId)
             		);
         }



Mime
View raw message