rolled back the use of ObjectName.quote() as it appends quotes and went back to Hiram's original code which looks much nicer in JMX consoles :)

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@357184 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2005-12-16 17:08:15 +00:00
parent 634ac91c3d
commit bf65e7d3cf
3 changed files with 4 additions and 7 deletions

View File

@ -65,7 +65,7 @@ public class ManagedRegionBroker extends RegionBroker {
// Build the object name for the destination
Hashtable map = new Hashtable(brokerObjectName.getKeyPropertyList());
map.put("Type",ObjectName.quote(destName.getDestinationTypeAsString()));
map.put("Type",JMXSupport.encodeObjectNamePart(destName.getDestinationTypeAsString()));
map.put("Destination", JMXSupport.encodeObjectNamePart(destName.getPhysicalName()));
ObjectName destObjectName= new ObjectName(brokerObjectName.getDomain(), map);
@ -77,7 +77,7 @@ public class ManagedRegionBroker extends RegionBroker {
public void unregister(ActiveMQDestination destName) throws Throwable {
// Build the object name for the destination
Hashtable map = new Hashtable(brokerObjectName.getKeyPropertyList());
map.put("Type",ObjectName.quote(destName.getDestinationTypeAsString()));
map.put("Type",JMXSupport.encodeObjectNamePart(destName.getDestinationTypeAsString()));
map.put("Destination", JMXSupport.encodeObjectNamePart(destName.getPhysicalName()));
ObjectName destObjectName= new ObjectName(brokerObjectName.getDomain(), map);

View File

@ -116,7 +116,7 @@ public class ManagedTransportConnection extends TransportConnection {
// Build the object name for the destination
Hashtable map = new Hashtable(connectorName.getKeyPropertyList());
map.put("Type", "Connection");
String jmxConnectionId = ObjectName.quote(connectionId);
String jmxConnectionId = JMXSupport.encodeObjectNamePart(connectionId);
map.put("Connection", JMXSupport.encodeObjectNamePart(connectionId));
try {
return new ObjectName(connectorName.getDomain(), map);

View File

@ -4,13 +4,10 @@ import javax.management.ObjectName;
public class JMXSupport {
static public String encodeObjectNamePart(String part) {
return ObjectName.quote(part);
/*
//return ObjectName.quote(part);
String answer = part.replaceAll("[\\:\\,\\'\\\"]", "_");
answer = answer.replaceAll("\\?", "&qe;");
answer = answer.replaceAll("=", "&");
return answer;
*/
}
}