public static void asynchron(Runnable task) { new MThread(task).start(); }
, getJmsDestination().getName()).start(); } else processMessage(message);
appender.start();
protected void doExecuteJobInternal(SchedulerJob job, boolean forced) { if (!job.setBusy(this)) { log().w("job is busy, reshedule",job.getName()); boolean isRunning = false; synchronized (running) { isRunning = running.contains(job); } try { if (!isRunning) { log().w("release job lock", job.getName()); job.releaseBusy(null); } else { log().w("found a running job in the scheduler queue", job.getName()); job.setNextExecutionTime(SchedulerJob.CALCULATE_NEXT); job.doSchedule(this); } } catch (Throwable t) { log().e("busy error",job.getName(),job,t); } return; } new MThread(new MyExecutor(job,forced)).start(); //TODO unsafe, monitor runtime use timeout or long runtime warnings, use maximal number of threads. be sure a job is running once }