Example usage for org.springframework.scheduling.quartz SchedulerFactoryBean setSchedulerFactoryClass

List of usage examples for org.springframework.scheduling.quartz SchedulerFactoryBean setSchedulerFactoryClass

Introduction

In this page you can find the example usage for org.springframework.scheduling.quartz SchedulerFactoryBean setSchedulerFactoryClass.

Prototype

public void setSchedulerFactoryClass(Class<? extends SchedulerFactory> schedulerFactoryClass) 

Source Link

Document

Set the Quartz SchedulerFactory implementation to use.

Usage

From source file:org.hsweb.web.service.impl.SchedulerAutoConfiguration.java

@Bean
public SchedulerFactoryBean schedulerFactory(JobFactory jobFactory) {
    SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean();
    schedulerFactoryBean.setApplicationContext(applicationContext);
    schedulerFactoryBean.setAutoStartup(schedulerProperties.isAutoStartup());
    schedulerFactoryBean.setDataSource(dataSource);
    schedulerFactoryBean.setTransactionManager(platformTransactionManager);
    schedulerFactoryBean.setOverwriteExistingJobs(schedulerProperties.isOverwriteExistingJobs());
    schedulerFactoryBean.setSchedulerFactoryClass(StdSchedulerFactory.class);
    schedulerFactoryBean.setBeanName(schedulerProperties.getBeanName());
    schedulerFactoryBean.setJobFactory(jobFactory);
    schedulerFactoryBean.setWaitForJobsToCompleteOnShutdown(schedulerProperties.isWaitOnShutdown());
    schedulerFactoryBean.setQuartzProperties(schedulerProperties.getProperties());
    return schedulerFactoryBean;
}