spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Allow configure TransactionManager for jobOperator.stop [BATCH-2524]

Open spring-projects-issues opened this issue 9 years ago • 4 comments

Nico opened BATCH-2524 and commented

SimpleJobOperator stop() is decorated with @Transactional, therefore we cannot configure the transactionManager name as the other components , forcing the implementation of org.springframework.transaction.annotation.TransactionManagementConfigurer to set the transactionManager to use.


Affects: 3.0.7

spring-projects-issues avatar Aug 11 '16 11:08 spring-projects-issues

Any update about this issue?

Matheus-Rangel avatar Apr 27 '20 12:04 Matheus-Rangel

I am running into the same problem in one of listeners where I am explicitly calling the SimpleJobOperator to stop the execution.

minimalistinnovator avatar May 04 '20 13:05 minimalistinnovator

Any update about this issue?

nkuflk avatar May 20 '20 05:05 nkuflk

No, we are working on the upcoming v4.3 and this issue is not planned for it. We will let you know in which version this issue will be addressed. Contributions are welcome.

fmbenhassine avatar May 20 '20 09:05 fmbenhassine

Along with https://github.com/spring-projects/spring-batch/issues/4195, both the transaction manager and the transaction attributes are now configurable in the proxy created around the JobOperator. This is indeed more flexible than the usage of a statically defined @Transactional on methods.

cc @nkuflk @Matheus-Rangel @minimalistinnovator

fmbenhassine avatar Sep 21 '22 09:09 fmbenhassine