Skip to content

Commit 4e1f10b

Browse files
committed
Add transactional advice around JobOperator#recover in JobOperatorFactoryBean
Related to #4876 Related to #4944
1 parent 39d3fe9 commit 4e1f10b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobOperatorFactoryBean.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ public void afterPropertiesSet() throws Exception {
8383
DefaultTransactionAttribute transactionAttribute = new DefaultTransactionAttribute();
8484
Method stopMethod = TaskExecutorJobOperator.class.getMethod("stop", JobExecution.class);
8585
Method abandonMethod = TaskExecutorJobOperator.class.getMethod("abandon", JobExecution.class);
86+
Method recoverMethod = TaskExecutorJobOperator.class.getMethod("recover", JobExecution.class);
8687
((MethodMapTransactionAttributeSource) this.transactionAttributeSource).addTransactionalMethod(stopMethod,
8788
transactionAttribute);
8889
((MethodMapTransactionAttributeSource) this.transactionAttributeSource)
8990
.addTransactionalMethod(abandonMethod, transactionAttribute);
91+
((MethodMapTransactionAttributeSource) this.transactionAttributeSource)
92+
.addTransactionalMethod(recoverMethod, transactionAttribute);
9093
}
9194
}
9295

0 commit comments

Comments
 (0)