Describe the bug
The Spring Boot integration is setting up:
- a UserTransactionService
- a UserTransactionManager
- an AtomikosDependsOnBeanFactoryPostProcessor that is making the UserTransactionManager depend on any DataSource and ConnectionFactory
However, if I understand Atomikos correctly:
- the UserTransactionService should be start before the UserTransactionManager, so that the latter can retrieve the configuration set up by the former; for this reason, I'd expect a
@DependsOn("userTransactionService") on atomikosTransactionManager
- the UserTransactionService itself needs the data sources (and I guess the connection factories) to be available, at least on shutdown; for this reason I would expect that
AtomikosDependsOnBeanFactoryPostProcessor applies the same logic on the UserTransactionService (or, better, only on that, once the UserTransactionManager had itself the "depends on" relationship of the previous point, causing it to transitively depend on the data sources/connection factories itself)
Indeed, once I started to implement Atomikos on my project, I goot XA errors on the UserTransactionService shutdown, because a last recovery pass is made during shutdown and one of the two data sources were already shut down before the service (Oracle was indeed returning error ORA-17008). Problem solved by adding manually such "depends on" relationships.
Unfortunately AtomikosDependsOnBeanFactoryPostProcessor cannot be easily extended, since its methods are private.
To Reproduce
Using Transaction Essentials 6.0.0 on Spring Boot 4.
Needed to re-write the configuration myself, by mimicking the AtomikosAutoConfiguration, due to it being incompatible with Spring Boot 4. I also needed more flexibility to set up my multiple data sources.
I'll try to add a screenshot separately, upload is failing right now.
Additional context
Setting up Atomikos transaction manager with Spring JTA XA transaction manager, in Spring Boot 4, using two distinct data sources.
I understand that this project is not intended for support - because bug reports may or may not be considered for inclusion some day (in a future release). If this is issue is important to me then I can go to https://www.atomikos.com/Main/SupportOverview and arrange a paid support subscription.
Describe the bug
The Spring Boot integration is setting up:
However, if I understand Atomikos correctly:
@DependsOn("userTransactionService")onatomikosTransactionManagerAtomikosDependsOnBeanFactoryPostProcessorapplies the same logic on the UserTransactionService (or, better, only on that, once the UserTransactionManager had itself the "depends on" relationship of the previous point, causing it to transitively depend on the data sources/connection factories itself)Indeed, once I started to implement Atomikos on my project, I goot XA errors on the UserTransactionService shutdown, because a last recovery pass is made during shutdown and one of the two data sources were already shut down before the service (Oracle was indeed returning error ORA-17008). Problem solved by adding manually such "depends on" relationships.
Unfortunately
AtomikosDependsOnBeanFactoryPostProcessorcannot be easily extended, since its methods are private.To Reproduce
Using Transaction Essentials 6.0.0 on Spring Boot 4.
Needed to re-write the configuration myself, by mimicking the
AtomikosAutoConfiguration, due to it being incompatible with Spring Boot 4. I also needed more flexibility to set up my multiple data sources.I'll try to add a screenshot separately, upload is failing right now.
Additional context
Setting up Atomikos transaction manager with Spring JTA XA transaction manager, in Spring Boot 4, using two distinct data sources.
I understand that this project is not intended for support - because bug reports may or may not be considered for inclusion some day (in a future release). If this is issue is important to me then I can go to https://www.atomikos.com/Main/SupportOverview and arrange a paid support subscription.