35.2 Using a Bitronix transaction manager
Bitronix is popular open source JTA transaction manager implementation. You can use the spring-boot-starter-jta-bitronix
starter to add the appropriate Bitronix dependencies to your project. As with Atomikos, Spring Boot will automatically configure Bitronix and post-process your beans to ensure that startup and shutdown ordering is correct.
By default Bitronix transaction log files (part1.btm
and part2.btm
) will be written to a transaction-logs
directory in your application home directory. You can customize this directory by using the spring.jta.log-dir
property. Properties starting spring.jta.bitronix.properties
are also bound to the bitronix.tm.Configuration
bean, allowing for complete customization. See the Bitronix documentation for details.
Note | |
---|---|
To ensure that multiple transaction managers can safely coordinate the same resource managers, each Bitronix instance must be configured with a unique ID. By default this ID is the IP address of the machine on which Bitronix is running. To ensure uniqueness in production, you should configure the spring.jta.transaction-manager-id property with a different value for each instance of your application. |