The software fault tolerance setting for a piece works as follows:
stepBuilders.get("step")
.<Partner,Partner>chunk(1)
.reader(reader())
.processor(processor())
.writer(writer())
.listener(logProcessListener())
.faultTolerant()
.skipLimit(10)
.skip(UnknownGenderException.class)
.listener(logSkipListener())
.build();
The trick is that with the addition of "chunk", the chain switches to SimpleStepBuilder, which offers a "faultTolerant" method.
My question is how to do this if you just have a mascot (no reader, processor, writer)?
The task definition works as follows:
stepBuilders.get("step")
.tasklet(tasklet())
.build();
Using the "tasklet" switches to TaskletStepBuilder, which does not offer the "faultTolerant" method. Therefore, I see no way to define properties such as skipLimit, etc.
Any ideas?
source
share