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

@ -42,8 +42,13 @@ public class TaskRunnerFactory {
public TaskRunnerFactory() {
this("ActiveMQ Task", Thread.NORM_PRIORITY, true, 1000);
}
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.priority = priority;
@ -54,7 +59,7 @@ public class TaskRunnerFactory {
// avoid
// using a thread pool to run tasks and use a DedicatedTaskRunner
// instead.
if ("true".equals(System.getProperty("org.apache.activemq.UseDedicatedTaskRunner"))) {
if (dedicatedTaskRunner || "true".equals(System.getProperty("org.apache.activemq.UseDedicatedTaskRunner"))) {
executor = null;
} else {
executor = createDefaultExecutor();