Spring Boot XA Transaction Autoconfiguration?
Hello,
I am working on a Spring Boot Java project where we are trying to incorporate XA transactions using the Atomikos implementation of JTA. However, we are struggling to see how to easily create the XAConnectionFactory. There does not seem to be any way to autoconfigure the creation of this bean and we are having to define the construction of this bean ourselves. Is there something we are missing?
Thanks,
Tom
Answers
-
Hi @toliver,
Sorry I haven't had time to look into this in detail and don't know the answer off the top of my head. Since you are using our JMS starter it should be the same as other examples you can find about Spring + JMS + Atomikos.
See if these resources might be useful to you:
- https://stackoverflow.com/questions/68815434/do-we-need-separate-xa-transaction-manager-configuration-in-an-application-using
- https://medium.com/@eranda/jms-xa-transactions-with-atomikos-427b23803e64 (there is a link to sample code in the references)
- https://www.baeldung.com/java-atomikos
If you can't find the answer I'd recommend asking on stackoverflow and tagging "spring", "spring-jms", "jms", "atomikos" and "solace". A lot of the spring folks are great at answering over there fast. Also please drop a link here so I can follow along and learn too :)
0 -
Hi @toliver ,
I did face similar issue. There is no auto configuration provided for XA Transactions. I created the SolXAConnectionFactory bean and initialised the AtomikosConnectionFactoryBean to get the two phase commit work between H2 database & Solace Message Broker. Please refer the github repo for your reference.
0