org.quartz.StatefulJob Java Examples

The following examples show how to use org.quartz.StatefulJob. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpringJobBeanWrapper.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
   String beanId = jobExecutionContext.getJobDetail().getJobDataMap().getString(SPRING_BEAN_NAME);
   Job job = (Job) applicationContext.getBean(beanId);
   if (job instanceof StatefulJob) {
      log.warn("Non-stateful wrapper used with stateful job: {}, use SpringStatefulJobBeanWrapper", beanId);
   }
   job.execute(jobExecutionContext);
}
 
Example #2
Source File: SpringJobBeanWrapper.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
   String beanId = jobExecutionContext.getJobDetail().getJobDataMap().getString(SPRING_BEAN_NAME);
   Job job = (Job) applicationContext.getBean(beanId);
   if (job instanceof StatefulJob) {
      log.warn("Non-stateful wrapper used with stateful job: {}, use SpringStatefulJobBeanWrapper", beanId);
   }
   job.execute(jobExecutionContext);
}