fixed bug where setting the clientID on the MBean ObjectName could break a JMX name

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@356520 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2005-12-13 16:19:06 +00:00
parent 262a5596d9
commit 507bb1bbab
1 changed files with 3 additions and 1 deletions

View File

@ -115,7 +115,9 @@ public class ManagedTransportConnection extends TransportConnection {
// Build the object name for the destination
Hashtable map = new Hashtable(connectorName.getKeyPropertyList());
map.put("Type", "Connection");
map.put("Connection", connectionId);
// lets avoid any JMX sensitive characters
String jmxConnectionId = connectionId.replace(':', '_');
map.put("Connection", jmxConnectionId);
try {
return new ObjectName(connectorName.getDomain(), map);
}