Added "requestsRecovery" bean property to JobDetailFactoryBean
Issue: SPR-10775
This commit is contained in:
parent
14b83c3fcc
commit
dfac1d0510
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2012 the original author or authors.
|
* Copyright 2002-2013 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -39,7 +39,7 @@ import org.springframework.context.ApplicationContextAware;
|
||||||
* sensible defaults. This class uses the Spring bean name as job name,
|
* sensible defaults. This class uses the Spring bean name as job name,
|
||||||
* and the Quartz default group ("DEFAULT") as job group if not specified.
|
* and the Quartz default group ("DEFAULT") as job group if not specified.
|
||||||
*
|
*
|
||||||
* <p><b>NOTE:</b> This FactoryBean works against both Quartz 1.x and Quartz 2.0/2.1,
|
* <p><b>NOTE:</b> This FactoryBean works against both Quartz 1.x and Quartz 2.x,
|
||||||
* in contrast to the older {@link JobDetailBean} class.
|
* in contrast to the older {@link JobDetailBean} class.
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
|
@ -62,6 +62,8 @@ public class JobDetailFactoryBean
|
||||||
|
|
||||||
private boolean durability = false;
|
private boolean durability = false;
|
||||||
|
|
||||||
|
private boolean requestsRecovery = false;
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
private String beanName;
|
private String beanName;
|
||||||
|
|
@ -132,6 +134,14 @@ public class JobDetailFactoryBean
|
||||||
this.durability = durability;
|
this.durability = durability;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the recovery flag for this job, i.e. whether or not the job should
|
||||||
|
* get re-executed if a 'recovery' or 'fail-over' situation is encountered.
|
||||||
|
*/
|
||||||
|
public void setRequestsRecovery(boolean requestsRecovery) {
|
||||||
|
this.requestsRecovery = requestsRecovery;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a textual description for this job.
|
* Set a textual description for this job.
|
||||||
*/
|
*/
|
||||||
|
|
@ -209,6 +219,7 @@ public class JobDetailFactoryBean
|
||||||
pvs.add("jobClass", this.jobClass);
|
pvs.add("jobClass", this.jobClass);
|
||||||
pvs.add("jobDataMap", this.jobDataMap);
|
pvs.add("jobDataMap", this.jobDataMap);
|
||||||
pvs.add("durability", this.durability);
|
pvs.add("durability", this.durability);
|
||||||
|
pvs.add("requestsRecovery", this.requestsRecovery);
|
||||||
pvs.add("description", this.description);
|
pvs.add("description", this.description);
|
||||||
bw.setPropertyValues(pvs);
|
bw.setPropertyValues(pvs);
|
||||||
this.jobDetail = (JobDetail) bw.getWrappedInstance();
|
this.jobDetail = (JobDetail) bw.getWrappedInstance();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue