File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
boot/registry/selector/internal
engine/transaction/jta/platform/internal
test/java/org/hibernate/orm/test/strategyselectors Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1010import org .hibernate .engine .transaction .jta .platform .internal .JBossAppServerJtaPlatform ;
1111import org .hibernate .engine .transaction .jta .platform .internal .JBossStandAloneJtaPlatform ;
1212import org .hibernate .engine .transaction .jta .platform .internal .ResinJtaPlatform ;
13+ import org .hibernate .engine .transaction .jta .platform .internal .SunOneJtaPlatform ;
1314import org .hibernate .engine .transaction .jta .platform .internal .WebSphereExtendedJtaPlatform ;
1415import org .hibernate .engine .transaction .jta .platform .internal .WebSphereJtaPlatform ;
1516import org .hibernate .engine .transaction .jta .platform .internal .WebSphereLibertyJtaPlatform ;
@@ -37,6 +38,7 @@ else if ( name.startsWith( "org." ) ) {
3738 case "WebSphereExtended" -> WebSphereExtendedJtaPlatform .class ;
3839 case "Atomikos" -> AtomikosJtaPlatform .class ;
3940 case "Resin" -> ResinJtaPlatform .class ;
41+ case "SunOne" -> SunOneJtaPlatform .class ;
4042 default -> null ;
4143 };
4244 }
Original file line number Diff line number Diff line change 1+ /*
2+ * SPDX-License-Identifier: LGPL-2.1-or-later
3+ * Copyright Red Hat Inc. and Hibernate Authors
4+ */
5+ package org .hibernate .engine .transaction .jta .platform .internal ;
6+
7+ import jakarta .transaction .TransactionManager ;
8+ import jakarta .transaction .UserTransaction ;
9+
10+ /**
11+ * {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform} implementation for Sun ONE Application Server 7 and above
12+ *
13+ * @author Robert Davidson
14+ * @author Sanjeev Krishnan
15+ * @author Emmanuel Bernard
16+ * @author Steve Ebersole
17+ */
18+ public class SunOneJtaPlatform extends AbstractJtaPlatform {
19+ public static final String TM_NAME = "java:appserver/TransactionManager" ;
20+ public static final String UT_NAME = "java:comp/UserTransaction" ;
21+
22+ @ Override
23+ protected TransactionManager locateTransactionManager () {
24+ return (TransactionManager ) jndiService ().locate ( TM_NAME );
25+ }
26+
27+ @ Override
28+ protected UserTransaction locateUserTransaction () {
29+ return (UserTransaction ) jndiService ().locate ( UT_NAME );
30+ }
31+ }
Original file line number Diff line number Diff line change 99import org .hibernate .engine .transaction .jta .platform .internal .JBossAppServerJtaPlatform ;
1010import org .hibernate .engine .transaction .jta .platform .internal .JBossStandAloneJtaPlatform ;
1111import org .hibernate .engine .transaction .jta .platform .internal .ResinJtaPlatform ;
12+ import org .hibernate .engine .transaction .jta .platform .internal .SunOneJtaPlatform ;
1213import org .hibernate .engine .transaction .jta .platform .internal .WebSphereExtendedJtaPlatform ;
1314import org .hibernate .engine .transaction .jta .platform .internal .WebSphereJtaPlatform ;
1415import org .hibernate .engine .transaction .jta .platform .internal .WebSphereLibertyJtaPlatform ;
@@ -59,6 +60,13 @@ public void verifyAllJtaPlatformResolve() {
5960 "org.hibernate.service.jta.platform.internal.ResinJtaPlatform"
6061 );
6162
63+ testJtaPlatformResolves (
64+ strategySelector ,
65+ SunOneJtaPlatform .class ,
66+ "SunOne" ,
67+ "org.hibernate.service.jta.platform.internal.SunOneJtaPlatform"
68+ );
69+
6270 testJtaPlatformResolves (
6371 strategySelector ,
6472 WeblogicJtaPlatform .class ,
You can’t perform that action at this time.
0 commit comments