-
Jan 27th, 2009, 04:03 AM
#1
retry after 30 seconds delay
Hi ,
I am doing one spring batch application which used to get a file from server. which is working fine.
If server down, i set retry as 3 times.
now i need to set delay of 30 seconds for each delay .
can any one guide me or give me any example of xml file for retry with some delay.
here is my code :
--------------
<bean id="simpleStep1" class="org.springframework.batch.sample.domain.tas kletFileDownload.ACHAlertFaultTolerantStepFactoryB ean">
<property name="itemReader" ref="itemGenerator" />
<property name="itemWriter" ref="itemWriter" />
<property name="itemProcessor" ref="ftpParamValues" />
<property name="retryLimit" value="3" />
<property name="retryableExceptionClasses" value="java.lang.Exception" />
<property name="jobRepository" ref="jobRepository"/>
<property name="backOffPolicy" ref="fixedBackOff"></property>
<!-- property name="retryPolicy" ref="timeoutRetryPolicy"/ -->
</bean>
<bean id="fixedBackOff" class="org.springframework.batch.sample.domain.tas kletFileDownload.FixedBackOffPolicy">
<property name="backOffPeriod" value="40000"/>
</bean>
-
Jan 27th, 2009, 09:04 AM
#2
There was an issue related to this in 1.1.3, which has been fixed:
http://jira.springframework.org/browse/BATCH-901
Or are you using 2.0?
-
Jan 28th, 2009, 04:37 AM
#3
yes i am using spring 2.0
yes i am using spring 2.0 .
can you give me any example with the xml file and its related java files for setting delay
-
Jan 28th, 2009, 10:36 AM
#4
Delay is set via the backoff policy, which is described in the retry section of the docs.
-
Jan 28th, 2009, 10:21 PM
#5
delay with example
can you give me the delay exmaple with the xml file
<bean id="simpleStep1" class="org.springframework.batch.sample.domain.tas kletFileDownload.FaultTolerantStepFactoryBean">
<property name="itemReader" ref="itemGenerator" />
<property name="itemWriter" ref="itemWriter" />
<property name="itemProcessor" ref="ftpParamValues" />
<property name="retryLimit" value="3" />
<property name="retryableExceptionClasses" value="java.lang.Exception" />
<property name="jobRepository" ref="jobRepository"/>
<property name="backOffPolicy" ref="fixedBackOff"></property>
<!-- property name="retryListeners" ref="retryListeners"/ -->
<!-- property name="retryPolicy" ref="timeoutRetryPolicy"/ -->
</bean>
can you give me the remaining steps for delay
-
Jan 29th, 2009, 09:51 AM
#6
You're likely affected by http://jira.springframework.org/browse/BATCH-994, can you try using the latest trunk?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules