open up to more Configuration

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@634421 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-03-06 21:29:22 +00:00
parent 4ae43a36b5
commit 9cc2d3776e
1 changed files with 7 additions and 2 deletions

View File

@ -44,6 +44,11 @@ public class TaskRunnerFactory {
} }
public TaskRunnerFactory(String name, int priority, boolean daemon, int maxIterationsPerRun) { public TaskRunnerFactory(String name, int priority, boolean daemon, int maxIterationsPerRun) {
this(name,priority,daemon,maxIterationsPerRun,false);
}
public TaskRunnerFactory(String name, int priority, boolean daemon, int maxIterationsPerRun, boolean dedicatedTaskRunner) {
this.name = name; this.name = name;
this.priority = priority; this.priority = priority;
@ -54,7 +59,7 @@ public class TaskRunnerFactory {
// avoid // avoid
// using a thread pool to run tasks and use a DedicatedTaskRunner // using a thread pool to run tasks and use a DedicatedTaskRunner
// instead. // instead.
if ("true".equals(System.getProperty("org.apache.activemq.UseDedicatedTaskRunner"))) { if (dedicatedTaskRunner || "true".equals(System.getProperty("org.apache.activemq.UseDedicatedTaskRunner"))) {
executor = null; executor = null;
} else { } else {
executor = createDefaultExecutor(); executor = createDefaultExecutor();