All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sakaiproject.component.app.scheduler.jobs.SpringStatefulJobBeanWrapper Maven / Gradle / Ivy

There is a newer version: 23.3
Show newest version
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