1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2013 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
39
39
* sensible defaults. This class uses the Spring bean name as job name,
40
40
* and the Quartz default group ("DEFAULT") as job group if not specified.
41
41
*
42
- * <p><b>NOTE:</b> This FactoryBean works against both Quartz 1.x and Quartz 2.0/2.1 ,
42
+ * <p><b>NOTE:</b> This FactoryBean works against both Quartz 1.x and Quartz 2.x ,
43
43
* in contrast to the older {@link JobDetailBean} class.
44
44
*
45
45
* @author Juergen Hoeller
@@ -62,6 +62,8 @@ public class JobDetailFactoryBean
62
62
63
63
private boolean durability = false ;
64
64
65
+ private boolean requestsRecovery = false ;
66
+
65
67
private String description ;
66
68
67
69
private String beanName ;
@@ -132,6 +134,14 @@ public void setDurability(boolean durability) {
132
134
this .durability = durability ;
133
135
}
134
136
137
+ /**
138
+ * Set the recovery flag for this job, i.e. whether or not the job should
139
+ * get re-executed if a 'recovery' or 'fail-over' situation is encountered.
140
+ */
141
+ public void setRequestsRecovery (boolean requestsRecovery ) {
142
+ this .requestsRecovery = requestsRecovery ;
143
+ }
144
+
135
145
/**
136
146
* Set a textual description for this job.
137
147
*/
@@ -209,6 +219,7 @@ public void afterPropertiesSet() {
209
219
pvs .add ("jobClass" , this .jobClass );
210
220
pvs .add ("jobDataMap" , this .jobDataMap );
211
221
pvs .add ("durability" , this .durability );
222
+ pvs .add ("requestsRecovery" , this .requestsRecovery );
212
223
pvs .add ("description" , this .description );
213
224
bw .setPropertyValues (pvs );
214
225
this .jobDetail = (JobDetail ) bw .getWrappedInstance ();
0 commit comments