final TriggerListener[] globalTriggerListeners = { globalSchedulerTriggerListener };
schedulerFactoryBean.setGlobalTriggerListeners(globalTriggerListeners);
final Properties quartzProperties = new Properties();
quartzProperties.put(SchedulerFactoryBean.PROP_THREAD_COUNT, Integer.toString(noOfThreads));
schedulerFactoryBean.setQuartzProperties(quartzProperties);
schedulerFactoryBean.afterPropertiesSet();
schedulerFactoryBean.start();
return schedulerFactoryBean.getScheduler();
}
private JobDetail createJobDetail(final ScheduledJobDetail scheduledJobDetail) throws Exception {