BATCH-63:added listeners and exceptions to <chunk-oriented>

This commit is contained in:
trisberg
2008-11-07 16:25:32 +00:00
parent 1270254608
commit 97ce100ff9
5 changed files with 145 additions and 7 deletions

View File

@@ -50,6 +50,9 @@ public class StepWithChunkOrientedJobParserTests {
@Autowired
private TestReader reader;
@Autowired
private TestListener listener;
@Autowired
private TestProcessor processor;
@@ -71,5 +74,6 @@ public class StepWithChunkOrientedJobParserTests {
assertTrue(reader.isExecuted());
assertTrue(processor.isExecuted());
assertTrue(writer.isExecuted());
assertTrue(listener.isExecuted());
}
}

View File

@@ -0,0 +1,17 @@
package org.springframework.batch.core.configuration.xml;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;
import org.springframework.batch.repeat.ExitStatus;
public class TestListener extends AbstractTestComponent implements StepExecutionListener {
public ExitStatus afterStep(StepExecution stepExecution) {
return null;
}
public void beforeStep(StepExecution stepExecution) {
executed = true;
}
}