简体   繁体   中英

Does Hibernate 4.3.x support JTA 1.1?

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?

The best I could find is this snippet from the build.gradle file found here. 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.

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 *.
                '*'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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