activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r356559 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/activemq: broker/jmx/ManagedRegionBroker.java broker/jmx/ManagedTransportConnection.java util/JMXSupport.java
Date Tue, 13 Dec 2005 18:15:45 GMT
Author: jstrachan
Date: Tue Dec 13 10:15:36 2005
New Revision: 356559

URL: http://svn.apache.org/viewcvs?rev=356559&view=rev
Log:
use the standard JMX quote method when creating JMX names

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedRegionBroker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/util/JMXSupport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedRegionBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedRegionBroker.java?rev=356559&r1=356558&r2=356559&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedRegionBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedRegionBroker.java
Tue Dec 13 10:15:36 2005
@@ -65,7 +65,7 @@
         
         // Build the object name for the destination
         Hashtable map = new Hashtable(brokerObjectName.getKeyPropertyList());
-        map.put("Type",destName.getDestinationTypeAsString());
+        map.put("Type",ObjectName.quote(destName.getDestinationTypeAsString()));
         map.put("Destination", JMXSupport.encodeObjectNamePart(destName.getPhysicalName()));
         ObjectName destObjectName= new ObjectName(brokerObjectName.getDomain(), map);
         
@@ -77,7 +77,7 @@
     public void unregister(ActiveMQDestination destName) throws Throwable {
         // Build the object name for the destination
         Hashtable map = new Hashtable(brokerObjectName.getKeyPropertyList());
-        map.put("Type",destName.getDestinationTypeAsString());
+        map.put("Type",ObjectName.quote(destName.getDestinationTypeAsString()));
         map.put("Destination", JMXSupport.encodeObjectNamePart(destName.getPhysicalName()));
         ObjectName destObjectName= new ObjectName(brokerObjectName.getDomain(), map);
         

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java?rev=356559&r1=356558&r2=356559&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
Tue Dec 13 10:15:36 2005
@@ -115,8 +115,7 @@
         // Build the object name for the destination
         Hashtable map = new Hashtable(connectorName.getKeyPropertyList());
         map.put("Type", "Connection");
-        // lets avoid any JMX sensitive characters
-        String jmxConnectionId = connectionId.replace(':', '_');
+        String jmxConnectionId = ObjectName.quote(connectionId);
         map.put("Connection", jmxConnectionId);
         try {
             return new ObjectName(connectorName.getDomain(), map);

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/util/JMXSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/util/JMXSupport.java?rev=356559&r1=356558&r2=356559&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/util/JMXSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/util/JMXSupport.java
Tue Dec 13 10:15:36 2005
@@ -1,11 +1,16 @@
 package org.activemq.util;
 
+import javax.management.ObjectName;
+
 public class JMXSupport {
     static public String encodeObjectNamePart(String part) {
+        return ObjectName.quote(part);
+        /*
         String answer = part.replaceAll("[\\:\\,\\'\\\"]", "_");
         answer = answer.replaceAll("\\?", "&qe;");
         answer = answer.replaceAll("=", "&");
         return answer;
+        */
         
     }
 }



Mime
View raw message