Skip to content

Commit a7ac008

Browse files
committed
HHH-19743 Default to NaranaJtaPlatform instead of JBossStandAlonePlatform when relevant
When we default to JBossStandaloneJtaPlatform, we've already checked that WildFlyStandAloneJtaPlatform cannot be used, so JBossStandAloneJtaPlatform is strictly equivalent to NarayanaJtaPlatform. Since JBossStandAloneJtaPlatform is deprecated, let's use NarayanaJtaPlatform instead.
1 parent a0004f8 commit a7ac008

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

hibernate-core/src/main/java/org/hibernate/engine/transaction/jta/platform/internal/StandardJtaPlatformResolver.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,30 +62,7 @@ public JtaPlatform resolveJtaPlatform(Map<?,?> configurationValues, ServiceRegis
6262
catch (ClassLoadingException ignore) {
6363
}
6464

65-
66-
// JBoss ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67-
// If we get here, we've already checked that WildFlyStandAloneJtaPlatform cannot be used,
68-
// so JBossStandAloneJtaPlatform is strictly equivalent to NarayanaJtaPlatform.
69-
// TODO HHH-19743 remove this block because of ^?
70-
try {
71-
classLoaderService.classForName( JBossStandAloneJtaPlatform.JBOSS_TM_CLASS_NAME );
72-
classLoaderService.classForName( JBossStandAloneJtaPlatform.JBOSS_UT_CLASS_NAME );
73-
74-
// we know that the JBoss TS classes are available
75-
// if neither of these look-ups resulted in an error (no such class), then JBossTM is available on
76-
// the classpath
77-
//
78-
// todo : we cannot really distinguish between the need for JBossStandAloneJtaPlatform versus JBossApServerJtaPlatform
79-
// but discussions with David led to the JtaPlatformProvider solution above, so inside JBoss AS we
80-
// should be relying on that
81-
return new JBossStandAloneJtaPlatform();
82-
}
83-
catch (ClassLoadingException ignore) {
84-
}
85-
8665
// Narayana ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87-
// TODO HHH-19743 this is effectively dead code as long as we have JBossStandadloneJtaPlatform above this code,
88-
// since both rely on the same class name checks.
8966
try {
9067
classLoaderService.classForName( NarayanaJtaPlatform.TM_CLASS_NAME );
9168
classLoaderService.classForName( NarayanaJtaPlatform.UT_CLASS_NAME );

0 commit comments

Comments
 (0)