Hi, I am having this parentStep:
Then I declare another step that inherit it:Code:<batch:step id="masterStep" abstract="true"> <batch:tasklet> <batch:chunk retry-limit="3" processor="dummyProcessor" writer="dummyWriter"> <batch:retryable-exception-classes> <batch:include class="org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException"/> <batch:include class="org.springframework.dao.CannotAcquireLockException"/> <batch:include class="org.springframework.dao.OptimisticLockingFailureException"/> <batch:include class="org.hibernate.StaleObjectStateException"/> </batch:retryable-exception-classes> </batch:chunk> </batch:tasklet> </batch:step>
I expect the retryable ex. class list will be inherited as well. But I encountered the error:Code:<batch:job id="ChildJob"> <batch:step id="ChildStep1" parent="masterStep"> <batch:tasklet> <batch:chunk commit-interval="3" reader="reader"> </batch:chunk> </batch:tasklet> </batch:step> </batch:job>
I found out that if I put the 'retry-limit' attribute on the ChildStep1 like this:the field 'retry-limit' is not permitted on the step [TopicArticlesStep1] because there is no 'retryable-exception-classes'
The error goes away.Code:<batch:chunk commit-interval="3" reader="reader" retry-limit=3> </batch:chunk>
Is it a bug ?
Or is it the expected way I need to declare the exception list with a merge="true" in the child step ? :
Thanks.Code:<batch:chunk commit-interval="3" reader="reader"> <batch:retryable-exception-classes merge="true"> </batch:retryable-exception-classes> </batch:chunk>


Reply With Quote
