简体   繁体   English

Hibernate 4.3.x是否支持JTA 1.1?

[英]Does Hibernate 4.3.x support JTA 1.1?

The maven dependency for Hibernate 4.3.x is JTA 1.2. Hibernate 4.3.x的maven依赖是JTA 1.2。 For license reasons we would prefer to use JTA 1.1 from Geronimo. 出于许可证原因,我们更愿意使用Geronimo的JTA 1.1。

However, I cannot find any clear indication of whether JTA 1.1 is compatibale with Hibernate 4.3.x. 但是,我无法找到JTA 1.1是否与Hibernate 4.3.x兼容的明确指示。 I see that in Hibernate 5.x the dependency has changed back to JTA 1.1 我看到在Hibernate 5.x中,依赖关系已经变回JTA 1.1

Can anyone confirm whether Hibernate 4.3.x is compatible with JTA 1.1? 谁能确认Hibernate 4.3.x是否与JTA 1.1兼容?

The best I could find is this snippet from the build.gradle file found here. 我能找到的最好的是这里的build.gradle文件中的这个片段 It is for 4.3.11.final and looks like a workaround if it is not in the version you currently have you could attempt to add it. 它适用于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 *.
                '*'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM