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
This commit is contained in:
Hiram R. Chirino 2006-02-16 01:37:49 +00:00
parent 4262889d51
commit 6701997522
1 changed files with 3 additions and 6 deletions

View File

@ -151,17 +151,14 @@ public class BrokerService implements Service {
* @throws Exception * @throws Exception
*/ */
public TransportConnector addConnector(TransportConnector connector) 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.setBroker(getBroker());
connector.setBrokerName(getBrokerName()); connector.setBrokerName(getBrokerName());
connector.setTaskRunnerFactory(getTaskRunnerFactory()); connector.setTaskRunnerFactory(getTaskRunnerFactory());
transportConnectors.add(connector); transportConnectors.add(connector);
if (isUseJmx()) { if (isUseJmx()) {
connector = connector.asManagedConnector(getManagementContext().getMBeanServer(), getBrokerObjectName());
registerConnectorMBean(connector); registerConnectorMBean(connector);
} }
return connector; return connector;