Reinstate Bitronix's default server ID, provide property to override it
Previously, Bitronix's server ID was hard-coded to be spring-boot-jta-bitronix. This created the possibility of multiple transaction managers performing recovery on each other's behalf as they would be unable to identify their own XIDs due to the common server ID. This commit reinstates the default (which is the IP address of the machine on which Bitronix is running), and introduces a new property, spring.jta.transaction-manager-id, that can be used to configure the id for both Atomikos and Bitronix. A cautionary note has also been added to the documentation for Atomikos and Bitronix explaining the need to configure this property. Closes gh-1548
This commit is contained in:
@@ -2047,6 +2047,12 @@ customize the Atomikos `UserTransactionServiceIml`. See the
|
||||
{dc-spring-boot}/jta/atomikos/AtomikosProperties.{dc-ext}[`AtomikosProperties` javadoc]
|
||||
for complete details.
|
||||
|
||||
CAUTION: To ensure that multiple transaction managers can safely coordinate the same
|
||||
resource managers, each Atomikos instance must be configured with a unique ID. By default
|
||||
this ID is the IP address of the machine on which Atomikos 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.
|
||||
|
||||
|
||||
|
||||
=== Using a Bitronix transaction manager
|
||||
@@ -2063,6 +2069,12 @@ are also bound to the `bitronix.tm.Configuration` bean, allowing for complete
|
||||
customization. See the http://btm.codehaus.org/api/2.0.1/bitronix/tm/Configuration.html[Bitronix
|
||||
documentation] for details.
|
||||
|
||||
CAUTION: 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.
|
||||
|
||||
|
||||
|
||||
=== Using a Java EE managed transaction manager
|
||||
|
||||
Reference in New Issue
Block a user