mirror of https://github.com/apache/activemq.git
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:
parent
dfc025b6ce
commit
8610db3e14
|
@ -356,9 +356,7 @@ public class BrokerService implements Service {
|
||||||
}
|
}
|
||||||
log.info("ActiveMQ Message Broker (" + getBrokerName() + ") is shutting down");
|
log.info("ActiveMQ Message Broker (" + getBrokerName() + ") is shutting down");
|
||||||
BrokerRegistry.getInstance().unbind(getBrokerName());
|
BrokerRegistry.getInstance().unbind(getBrokerName());
|
||||||
//remove any VMTransports connected
|
|
||||||
VMTransportFactory.stopped(getBrokerName());
|
|
||||||
|
|
||||||
removeShutdownHook();
|
removeShutdownHook();
|
||||||
|
|
||||||
ServiceStopper stopper = new ServiceStopper();
|
ServiceStopper stopper = new ServiceStopper();
|
||||||
|
@ -366,12 +364,7 @@ public class BrokerService implements Service {
|
||||||
masterConnector.stop();
|
masterConnector.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
|
|
||||||
|
|
||||||
TransportConnector connector = (TransportConnector) iter.next();
|
|
||||||
stopper.stop(connector);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
|
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
|
||||||
NetworkConnector connector = (NetworkConnector) iter.next();
|
NetworkConnector connector = (NetworkConnector) iter.next();
|
||||||
stopper.stop(connector);
|
stopper.stop(connector);
|
||||||
|
@ -386,6 +379,16 @@ public class BrokerService implements Service {
|
||||||
JmsConnector connector = (JmsConnector) iter.next();
|
JmsConnector connector = (JmsConnector) iter.next();
|
||||||
stopper.stop(connector);
|
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());
|
stopper.stop(getPersistenceAdapter());
|
||||||
|
|
Loading…
Reference in New Issue