Does Hibernate 4.3.x support JTA 1.1?

时间:2016-08-31 12:30:15

标签: java hibernate jta

The maven dependency for Hibernate 4.3.x is JTA 1.2. For license reasons we would prefer to use JTA 1.1 from Geronimo.

However, I cannot find any clear indication of whether JTA 1.1 is compatibale with Hibernate 4.3.x. I see that in Hibernate 5.x the dependency has changed back to JTA 1.1

Can anyone confirm whether Hibernate 4.3.x is compatible with JTA 1.1?

1 个答案:

答案 0 :(得分:2)

我能找到的最好的是build.gradle文件中的这个片段found here.它适用于4.3.11.final,如果它不在您目前可以尝试添加的版本中,看起来像是一种解决方法它

instruction 'Import-Package',
                // Temporarily support JTA 1.1 -- Karaf and other frameworks still
                // use it.  Without this, the plugin generates [1.2,2).
                'javax.transaction;version="[1.1,2)"',
                // Tell Gradle OSGi to still dynamically import the other packages.
                // IMPORTANT: Do not include the * in the modules' .gradle files.
                // If it exists more than once, the manifest will physically contain a *.
                '*'