From f048eb9e4fe4fdfe9f8493d1b7597ea52089ee98 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Mon, 22 Aug 2016 18:28:09 -0700 Subject: [PATCH] HHH-11059 : Improve documentation for JTA configuration in 5.0 migration guide --- migration-guide.adoc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/migration-guide.adoc b/migration-guide.adoc index aec78f6c4b..8f65a52316 100644 --- a/migration-guide.adoc +++ b/migration-guide.adoc @@ -45,11 +45,19 @@ with 5.0 the new contract is `org.hibernate.resource.transaction.TransactionCoor JavaDocs for additional details. The following short-names are recognized: -`jdbc`::(the default) says to use JDBC-based transactions (`org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl`) +`jdbc`::(the default for non-JPA applications) says to use JDBC-based transactions (`org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl`) `jta`::says to use JTA-based transactions (`org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl`) -See the User Guide for additional details. +If a JPA application does not provide a setting for `hibernate.transaction.coordinator_class`, Hibernate will +automatically build the proper transaction coordinator based on the transaction type for the persistence unit. +If a non-JPA application does not provide a setting for `hibernate.transaction.coordinator_class`, Hibernate +will use `jdbc` as the default. This default will cause problems if the application actually uses JTA-based transactions. +A non-JPA application that uses JTA-based transactions should explicitly set `hibernate.transaction.coordinator_class=jta` +or provide a custom `org.hibernate.resource.transaction.TransactionCoordinatorBuilder` that builds a +`org.hibernate.resource.transaction.TransactionCoordinator` that properly coordinates with JTA-based transactions. + +See the User Guide for additional details. == Type handling