diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ItemOrientedStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ItemOrientedStep.java index 403620b9c..d107e4922 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ItemOrientedStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ItemOrientedStep.java @@ -267,6 +267,7 @@ public class ItemOrientedStep extends AbstractStep { // reference to the ExecutionContext as the step execution. listener.beforeStep(stepExecution); stream.open(stepExecution.getExecutionContext()); + itemHandler.mark(); status = stepOperations.iterate(new RepeatCallback() { @@ -287,7 +288,6 @@ public class ItemOrientedStep extends AbstractStep { try { - itemHandler.mark(); result = processChunk(stepExecution, contribution); contribution.incrementCommitCount();