use of com.revolsys.logging.log4j.ThreadLocalAppenderRunnable in project com.revolsys.open by revolsys.
the class ProcessNetwork method start.
private synchronized void start(final Process process) {
if (this.parent == null) {
if (this.processes != null) {
Thread thread = this.processes.get(process);
if (thread == null) {
final Process runProcess;
if (process instanceof TargetBeanProcess) {
final TargetBeanProcess targetBeanProcess = (TargetBeanProcess) process;
runProcess = targetBeanProcess.getProcess();
this.processes.remove(process);
} else {
runProcess = process;
}
final Runnable runnable = new ProcessRunnable(this, runProcess);
final String name = runProcess.toString();
final Runnable appenderRunnable = new ThreadLocalAppenderRunnable(runnable);
thread = new Thread(this.threadGroup, appenderRunnable, name);
this.processes.put(runProcess, thread);
if (!thread.isAlive()) {
thread.start();
this.count++;
}
}
}
}
}
Aggregations