Permit to disable JTA using a single property

Disable JTA auto-configuration altogether with a simple property. This
can be useful if the environment is JTA capable but the application does
not require it.

Fixes gh-1457
This commit is contained in:
Stephane Nicoll
2014-11-04 14:43:49 +01:00
parent 814803046a
commit 9dec27e7bf
4 changed files with 24 additions and 1 deletions

View File

@@ -2032,7 +2032,9 @@ transactions are also supported when deploying to a suitable Java EE Application
When a JTA environment is detected, Spring's `JtaTransactionManager` will be used to manage
transactions. Auto-configured JMS, DataSource and JPA beans will be upgraded to support
XA transactions. You can use standard Spring idioms such as `@Transactional` to
participate in a distributed transaction.
participate in a distributed transaction. If you are within a JTA environment and still
want to use local transactions you can set the `spring.jta.enabled` property to `false` to
disable the JTA auto-configuration.