AMQ-484: Restore discoveryUri when replacing TransportConnector with ManagedTransportConnector

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@368911 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dennis Cook 2006-01-13 23:11:20 +00:00
parent 0b629636d2
commit eef9202675
1 changed files with 2 additions and 0 deletions

View File

@ -144,7 +144,9 @@ public class BrokerService implements Service {
*/ */
public TransportConnector addConnector(TransportConnector connector) throws Exception { public TransportConnector addConnector(TransportConnector connector) throws Exception {
if (isUseJmx()) { if (isUseJmx()) {
URI discoveryUri = connector.getDiscoveryUri();
connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName()); connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName());
connector.setDiscoveryUri(discoveryUri);
} }
connector.setBroker(getBroker()); connector.setBroker(getBroker());
transportConnectors.add(connector); transportConnectors.add(connector);