private static Scheduler getSingletonScheduler() throws Exception {
if (singletonScheduler!=null) {
return singletonScheduler;
}
final Scheduler newscheduler = new QuartzScheduler();
final ThreadPoolManager tpm = new DefaultThreadPoolManager(null, null);
try {
PrivateAccessor.invoke(newscheduler, "bindThreadPoolManager",
new Class[] { ThreadPoolManager.class },
new Object[] { tpm });