diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ChunkElementCommitIntervalParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ChunkElementLateBindingParserTests-context.xml similarity index 100% rename from spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ChunkElementCommitIntervalParserTests-context.xml rename to spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ChunkElementLateBindingParserTests-context.xml diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/retry/support/RetryTemplate.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/retry/support/RetryTemplate.java index aaa372f8b..b91691321 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/retry/support/RetryTemplate.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/retry/support/RetryTemplate.java @@ -245,7 +245,11 @@ public class RetryTemplate implements RetryOperations { doOnErrorInterceptors(retryCallback, context, e); - registerThrowable(retryPolicy, state, context, e); + try { + registerThrowable(retryPolicy, state, context, e); + } catch (Exception ex) { + throw new TerminatedRetryException("Terminated retry after error in policy", ex); + } if (canRetry(retryPolicy, context) && !context.isExhaustedOnly()) { try {