diff --git a/hibernate-core/src/main/java/org/hibernate/boot/registry/selector/internal/StrategySelectorBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/registry/selector/internal/StrategySelectorBuilder.java index 72b33a4559..8d2e581f98 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/registry/selector/internal/StrategySelectorBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/registry/selector/internal/StrategySelectorBuilder.java @@ -84,6 +84,7 @@ import org.hibernate.engine.transaction.jta.platform.internal.SapNetWeaverJtaPla import org.hibernate.engine.transaction.jta.platform.internal.SunOneJtaPlatform; import org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform; import org.hibernate.engine.transaction.jta.platform.internal.WebSphereJtaPlatform; +import org.hibernate.engine.transaction.jta.platform.internal.WebSphereLibertyJtaPlatform; import org.hibernate.engine.transaction.jta.platform.internal.WeblogicJtaPlatform; import org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform; import org.hibernate.event.internal.EntityCopyAllowedLoggedObserver; @@ -341,6 +342,13 @@ public class StrategySelectorBuilder { "Weblogic", "org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform" ); + + addJtaPlatforms( + strategySelector, + WebSphereLibertyJtaPlatform.class, + "WebSphereLiberty", + "org.hibernate.engine.transaction.jta.platform.internal.WebSphereLibertyJtaPlatform" + ); addJtaPlatforms( strategySelector, diff --git a/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/StandardJtaPlatformResolver.java b/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/StandardJtaPlatformResolver.java index bd8db67e05..5e0e8e3e78 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/StandardJtaPlatformResolver.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/StandardJtaPlatformResolver.java @@ -86,8 +86,16 @@ public class StandardJtaPlatformResolver implements JtaPlatformResolver { } catch (ClassLoadingException ignore) { } - - // WebSphere ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // WebSphere Liberty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + try { + classLoaderService.classForName(WebSphereLibertyJtaPlatform.TMF_CLASS_NAME); + return new WebSphereLibertyJtaPlatform(); + } + catch (ClassLoadingException ignore) { + } + + // WebSphere traditional ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for ( WebSphereJtaPlatform.WebSphereEnvironment webSphereEnvironment : WebSphereJtaPlatform.WebSphereEnvironment.values() ) { try { diff --git a/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/WebSphereExtendedJtaPlatform.java b/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/WebSphereExtendedJtaPlatform.java index 4c43621476..9b99d03a41 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/WebSphereExtendedJtaPlatform.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/WebSphereExtendedJtaPlatform.java @@ -32,7 +32,7 @@ import org.hibernate.HibernateException; *