threadPool.initialize();
String schedulerName = DirectSchedulerFactory.DEFAULT_SCHEDULER_NAME;
String schedulerInstanceId = DirectSchedulerFactory.DEFAULT_INSTANCE_ID;
QuartzSchedulerResources qrs = new QuartzSchedulerResources();
JobRunShellFactory jrsf = new StdJobRunShellFactory();
qrs.setName(schedulerName);
qrs.setInstanceId(schedulerInstanceId);
qrs.setJobRunShellFactory(jrsf);
qrs.setThreadPool(threadPool);
qrs.setThreadExecutor(new DefaultThreadExecutor());
qrs.setJobStore(store);
qrs.setRunUpdateCheck(false);
QuartzScheduler qs = new QuartzScheduler(qrs, -1, -1);
ClassLoadHelper cch = new CascadingClassLoadHelper();
cch.initialize();
store.initialize(cch, qs.getSchedulerSignaler());
org.quartz.Scheduler scheduler = new StdScheduler(qs);
jrsf.initialize(scheduler);
qs.initialize();
return scheduler;
}