RESOLVED - issue BATCH-920, BATCH-974: ChunkContext in StepContextRepeatCallback is unused

This commit is contained in:
dsyer
2008-12-30 13:40:18 +00:00
parent e4ca63a927
commit 7d7480578d
17 changed files with 169 additions and 55 deletions

View File

@@ -8,9 +8,9 @@ import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.RepeatStatus;
import org.springframework.core.AttributeAccessor;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
public class ErrorLogTasklet implements Tasklet, StepExecutionListener {
@@ -21,7 +21,7 @@ public class ErrorLogTasklet implements Tasklet, StepExecutionListener {
private String jobName;
private String stepName;
public RepeatStatus execute(StepContribution contribution, AttributeAccessor attributes) throws Exception {
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
this.simpleJdbcTemplate.update("insert into ERROR_LOG values ('"+jobName+"', '"+stepName+"', 'Some records were skipped!')");
return RepeatStatus.FINISHED;
}