Apache ShardingSphere provides XA transactions, and the default XA transaction manager is Atomikos.
Yaml:
- !TRANSACTION
defaultType: XA
providerType: Atomikos
SpringBoot:
spring:
shardingsphere:
props:
xa-transaction-manager-type: Atomikos
Spring Namespace:
<shardingsphere:data-source id="xxx" data-source-names="xxx" rule-refs="xxx">
<props>
<prop key="xa-transaction-manager-type">Atomikos</prop>
</props>
</shardingsphere:data-source>
Atomikos configuration items can be customized by adding jta.properties
to the project’s classpath.
See Atomikos’s official documentation for more details.
xa_tx.log
is generated in the logs
directory of the project. This is the log required for recovering XA crash. Do not delete it.