From 67019975228d04754f599dc773be54d2c97efdc8 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Thu, 16 Feb 2006 01:37:49 +0000 Subject: [PATCH] Fixed test cases that I broke with my previous commit to this file. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@378137 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/broker/BrokerService.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 d21cd1701e..92f19db447 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 @@ -151,17 +151,14 @@ public class BrokerService implements Service { * @throws Exception */ public TransportConnector addConnector(TransportConnector connector) throws Exception { - int what = System.identityHashCode(connector); - if (isUseJmx()) { - URI discoveryUri = connector.getDiscoveryUri(); - connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName()); - connector.setDiscoveryUri(discoveryUri); - } + connector.setBroker(getBroker()); connector.setBrokerName(getBrokerName()); connector.setTaskRunnerFactory(getTaskRunnerFactory()); transportConnectors.add(connector); + if (isUseJmx()) { + connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName()); registerConnectorMBean(connector); } return connector;