Search in sources :

Example 16 with StdSchedulerFactory

use of org.quartz.impl.StdSchedulerFactory in project oxCore by GluuFederation.

the class QuartzSchedulerManager method initInternal.

protected void initInternal() {
    try {
        StdSchedulerFactory factory = new StdSchedulerFactory();
        factory.initialize(QUARTZ_PROPERTY_FILE_NAME);
        scheduler = factory.getScheduler();
        // Register job listener to bound request context to every job
        // execution
        scheduler.getListenerManager().addJobListener(jobListener, EverythingMatcher.allJobs());
        // Replace default job factory
        scheduler.setJobFactory(jobFactory);
    } catch (SchedulerException ex) {
        throw new IllegalStateException("Failed to initialize Quartz scheduler manager", ex);
    }
    log.info("Quartz scheduler manager initialized");
}
Also used : StdSchedulerFactory(org.quartz.impl.StdSchedulerFactory) SchedulerException(org.quartz.SchedulerException)

Aggregations

StdSchedulerFactory (org.quartz.impl.StdSchedulerFactory)16 SchedulerFactory (org.quartz.SchedulerFactory)7 SchedulerException (org.quartz.SchedulerException)6 Properties (java.util.Properties)5 InputStream (java.io.InputStream)4 Scheduler (org.quartz.Scheduler)4 IOException (java.io.IOException)2 ParseException (java.text.ParseException)2 Test (org.junit.Test)2 CronTrigger (org.quartz.CronTrigger)2 JobDetail (org.quartz.JobDetail)2 Trigger (org.quartz.Trigger)2 SimpleThreadPool (org.quartz.simpl.SimpleThreadPool)2 JobSystemException (com.dangdang.ddframe.job.exception.JobSystemException)1 TaskManagerConfiguration (com.evolveum.midpoint.task.quartzimpl.TaskManagerConfiguration)1 Inject (com.google.inject.Inject)1 Provides (com.google.inject.Provides)1 FileInputStream (java.io.FileInputStream)1 ResourceBundle (java.util.ResourceBundle)1 JobExecutionException (org.quartz.JobExecutionException)1