remove VMTransport connectors last in stop() - can prevent hanging tests

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@378966 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-02-19 22:12:39 +00:00
parent dfc025b6ce
commit 8610db3e14
1 changed files with 12 additions and 9 deletions

View File

@ -356,9 +356,7 @@ public class BrokerService implements Service {
}
log.info("ActiveMQ Message Broker (" + getBrokerName() + ") is shutting down");
BrokerRegistry.getInstance().unbind(getBrokerName());
//remove any VMTransports connected
VMTransportFactory.stopped(getBrokerName());
removeShutdownHook();
ServiceStopper stopper = new ServiceStopper();
@ -366,12 +364,7 @@ public class BrokerService implements Service {
masterConnector.stop();
}
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
TransportConnector connector = (TransportConnector) iter.next();
stopper.stop(connector);
}
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
NetworkConnector connector = (NetworkConnector) iter.next();
stopper.stop(connector);
@ -386,6 +379,16 @@ public class BrokerService implements Service {
JmsConnector connector = (JmsConnector) iter.next();
stopper.stop(connector);
}
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
TransportConnector connector = (TransportConnector) iter.next();
stopper.stop(connector);
}
//remove any VMTransports connected
VMTransportFactory.stopped(getBrokerName());
stopper.stop(getPersistenceAdapter());