diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index 32447e2a30..2919abfabd 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -144,7 +144,9 @@ public class BrokerService implements Service { */ public TransportConnector addConnector(TransportConnector connector) throws Exception { if (isUseJmx()) { + URI discoveryUri = connector.getDiscoveryUri(); connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName()); + connector.setDiscoveryUri(discoveryUri); } connector.setBroker(getBroker()); transportConnectors.add(connector);