When you say "currently" you mean "currently with my configuration" not "currently with Spring Batch". Here is a snippet that should work something like you want it to with the current snapshot:
Code:
<bean id="hibernateJob" parent="simpleJob">
<property name="steps">
<bean id="step1" class="org.springframework.batch.execution.step.ChunkOperationsStepConfiguration">
<property name="tasklet">
<bean
class="org.springframework.batch.execution.tasklet.RestartableItemProviderTasklet">
<property name="itemProvider">
<bean
class="org.springframework.batch.item.provider.InputSourceItemProvider">
<property name="inputSource"
ref="hibernateInputSource" />
</bean>
</property>
<property name="itemProcessor">
<bean
class="org.springframework.batch.sample.item.processor.CustomerCreditIncreaseProcessor">
<property name="outputSource" ref="hibernateOutputSource"/>
</bean>
</property>
</bean>
</property>
<property name="chunkOperations">
<bean class="org.springframework.batch.repeat.support.RepeatTemplate">
<property name="interceptor" ref="hibernateOutputSource"/>
<property name="completionPolicy">
<bean class="org.springframework.batch.repeat.policy.SimpleCompletionPolicy">
<property name="chunkSize" value="3"/>
</bean>
</property>
<property name="exceptionHandler">
<bean class="org.springframework.batch.repeat.exception.handler.SimpleLimitExceptionHandler"
p:limit="5" p:useParent="true" p:type="java.lang.Exception"/>
</property>
</bean>
</property>
</bean>
</property>
</bean>
It will rethrow on the 6th Exception of any type in any chunk. For more control you can use RethrowOnThresholdExceptionHandler.