AMQ-3451: Ensure thread pools is shutdown properly to avoid any leaks. Do not use the old @deprecated thread pool.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1381987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Claus Ibsen 2012-09-07 12:05:53 +00:00
parent 8a01c5d16a
commit 4e1989247e
1 changed files with 3 additions and 2 deletions

View File

@ -288,11 +288,12 @@ public class VMTransport implements Transport, Task {
throw new TransportDisposedIOException("The Transport has been disposed");
}
String name = "ActiveMQ VMTransport: " + toString();
if (taskRunnerFactory == null) {
taskRunnerFactory = new TaskRunnerFactory("ActiveMQ VMTransport: " + toString());
taskRunnerFactory = new TaskRunnerFactory(name);
taskRunnerFactory.init();
}
taskRunner = result = taskRunnerFactory.createTaskRunner(this, "VMTransport: " + toString());
taskRunner = result = taskRunnerFactory.createTaskRunner(this, name);
}
}
}