Use ThreadPool for stopping services

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@638235 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-03-18 06:38:18 +00:00
parent ec15e1c05a
commit 44e6f7d0cd
1 changed files with 4 additions and 5 deletions

View File

@ -379,12 +379,11 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge {
LOG.warn("Network connection between " + localBroker + " and " + remoteBroker + " shutdown due to a remote error: " + error);
}
LOG.debug("The remote Exception was: " + error, error);
new Thread() {
ASYNC_TASKS.execute(new Runnable() {
public void run() {
ServiceSupport.dispose(DemandForwardingBridgeSupport.this);
}
}.start();
});
fireBridgeFailed();
}
}
@ -532,11 +531,11 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge {
if (!disposed) {
LOG.info("Network connection between " + localBroker + " and " + remoteBroker + " shutdown due to a local error: " + error);
LOG.debug("The local Exception was:" + error, error);
new Thread() {
ASYNC_TASKS.execute(new Runnable() {
public void run() {
ServiceSupport.dispose(DemandForwardingBridgeSupport.this);
}
}.start();
});
fireBridgeFailed();
}
}