BATCH-63:added listeners and exceptions to <chunk-oriented>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user