RESOLVED - issue BATCH-510: FlatFileItemWriter.restarted logic fails if step fails before first chunk commit.

http://jira.springframework.org/browse/BATCH-510

added initial save of execution context before first chunk
This commit is contained in:
robokaso
2008-03-26 09:45:07 +00:00
parent f690e39440
commit 6989745c12
2 changed files with 79 additions and 27 deletions

View File

@@ -262,6 +262,8 @@ public class ItemOrientedStep extends AbstractStep {
// reference to the ExecutionContext as the step execution.
listener.beforeStep(stepExecution);
stream.open(stepExecution.getExecutionContext());
stream.update(stepExecution.getExecutionContext());
jobRepository.saveOrUpdateExecutionContext(stepExecution);
itemHandler.mark();
status = stepOperations.iterate(new RepeatCallback() {