org.sakaiproject.component.app.scheduler.jobs.SpringStatefulJobBeanWrapper Maven / Gradle / Ivy
package org.sakaiproject.component.app.scheduler.jobs;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;
import org.sakaiproject.component.cover.ComponentManager;
/**
* This is the wrapper that tells quartz that is should make the jobs stateful.
* @see SpringJobBeanWrapper
*/
public class SpringStatefulJobBeanWrapper extends SpringJobBeanWrapper implements StatefulJob {
public SpringStatefulJobBeanWrapper() {
super();
}
public void execute(JobExecutionContext jobExecutionContext) throws
JobExecutionException {
String beanId =
jobExecutionContext.getJobDetail().getJobDataMap().getString(SPRING_BEAN_NAME);
Job job = (Job) ComponentManager.get(beanId);
job.execute(jobExecutionContext);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy