protected void doRollback(DefaultTransactionStatus status) throws TransactionException {
throw new RuntimeException("foo");
}
});
taskletStep.setTasklet(new Tasklet() {
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext attributes) throws Exception {
attributes.getStepContext().getStepExecution().getExecutionContext().putString("foo", "bar");
return RepeatStatus.FINISHED;