-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Introduce @BatchTransactionManager to make it easier to configure Spring Batch to use a custom transaction manager #37650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can provide your own sub-class of |
Thanks Andy! Still, besides my individual issue, I think the default for the transactionmanager should be different if |
WDYT, @fmbenhassine? Should we introduce |
Or perhaps autoconfigure the TransactionManager according to a possible @BatchDatasource like DefaultBatchConfigurer did.
also
What we almost certain don't want ever is using the context/domain TransacionManager if you are takeing the trouble of defining a |
@wilkinsona I am not opposed to adding |
Add a new annotation for marking a second PlatformTransactionManager to be used in batch processing. See spring-projectsgh-37650
Add a new annotation for marking a second PlatformTransactionManager to be used in batch processing. See spring-projectsgh-37650
Closing in favor of #39473 |
Same as BatchAutconfiguration uses @BatchDatasource to tell apart the batch datasource from the main domain one, it should happen something similar to TransactionManager, or either build it by default over the passed @BatchDatasource
I would be tempted to think this is a batch issue in https://github.com/spring-projects/spring-batch/blob/11e653287f51a3c495a836cc0646ee58daea9fbf/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultBatchConfiguration.java, but I can understand they don't want to provide defaults, but just expect the superior level to do so
Another option is some kind of Atomikos or old ChainedTransactionManager chaining
Is there any workaround right now in latest Boot to configure an independent Batch stack (transactionmanager,emf,datasource) on a regular Boot service that already expects an autoconfigured conventional domain database ?
The text was updated successfully, but these errors were encountered: