mirror of https://github.com/apache/activemq.git
Group the connections using the connector name that they were created from.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@392043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b76530740e
commit
d724f9ed4d
|
@ -773,16 +773,10 @@ public class BrokerService implements Service, Serializable {
|
|||
|
||||
}
|
||||
|
||||
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 @@ public class BrokerService implements Service, Serializable {
|
|||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -117,8 +117,9 @@ public class ManagedTransportConnection extends TransportConnection {
|
|||
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)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue