return;
}
log.info("Quartz Initializer Servlet loaded, initializing Scheduler...");
ServletContext servletContext = sce.getServletContext();
StdSchedulerFactory factory;
try {
String configFile = servletContext.getInitParameter("quartz:config-file");
if(configFile == null)
configFile = servletContext.getInitParameter("config-file"); // older name, for backward compatibility
String shutdownPref = servletContext.getInitParameter("quartz:shutdown-on-unload");
if(shutdownPref == null)
shutdownPref = servletContext.getInitParameter("shutdown-on-unload");
if (shutdownPref != null) {
performShutdown = Boolean.valueOf(shutdownPref).booleanValue();
}
String shutdownWaitPref = servletContext.getInitParameter("quartz:wait-on-shutdown");
if (shutdownPref != null) {
waitOnShutdown = Boolean.valueOf(shutdownWaitPref).booleanValue();
}
// get Properties
if (configFile != null) {
factory = new StdSchedulerFactory(configFile);
} else {
factory = new StdSchedulerFactory();
}
// Always want to get the scheduler, even if it isn't starting,
// to make sure it is both initialized and registered.
SchedulerProvider.scheduler = factory.getScheduler();
// System.out.println(SchedulerProvider.scheduler.getSchedulerInstanceId());
// System.out.println(SchedulerProvider.scheduler.getSchedulerName());
// System.out.println(SchedulerProvider.scheduler.getMetaData().getSummary());