Incomplete - task 84: Fix samples
Fix rollback tests as well - exception handler too complicated
This commit is contained in:
@@ -195,8 +195,8 @@ public class ItemOrientedStep extends AbstractStep implements InitializingBean {
|
||||
((RepeatTemplate) chunkOperations).setCompletionPolicy(new SimpleCompletionPolicy(commitInterval));
|
||||
}
|
||||
|
||||
if (this.chunkOperations instanceof RepeatTemplate && exceptionHandler != null) {
|
||||
((RepeatTemplate) chunkOperations).setExceptionHandler(exceptionHandler);
|
||||
if (this.stepOperations instanceof RepeatTemplate && exceptionHandler != null) {
|
||||
((RepeatTemplate) stepOperations).setExceptionHandler(exceptionHandler);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ public class ItemOrientedStepTests extends TestCase {
|
||||
|
||||
public void testApplyConfigurationWithExceptionHandler() throws Exception {
|
||||
final List list = new ArrayList();
|
||||
itemOrientedStep.setChunkOperations(new RepeatTemplate() {
|
||||
itemOrientedStep.setStepOperations(new RepeatTemplate() {
|
||||
public void setExceptionHandler(ExceptionHandler exceptionHandler) {
|
||||
list.add(exceptionHandler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user