openjpa/openjpa-2.3.0-remove-WASRegistryManagedRuntime.patch
2020-08-28 13:44:10 +08:00

59 lines
2.3 KiB
Diff

--- openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java 2013-11-11 21:09:40.000000000 +0100
+++ openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java-gil 2014-06-20 12:01:33.445611356 +0200
@@ -78,7 +78,6 @@
private final WLSManagedRuntime WLS;
private final SunOneManagedRuntime SUNONE;
private final WASManagedRuntime WAS;
- private final WASRegistryManagedRuntime WAS_REG;
private static Localizer _loc = Localizer.forPackage
(AutomaticManagedRuntime.class);
@@ -117,26 +116,6 @@
} catch (Throwable t) {
}
WAS = (WASManagedRuntime) mr;
-
- mr = null;
- try {
- // In a WebSphere environment the thread's current classloader might
- // not have access to the WebSphere APIs. However the "runtime"
- // classloader will have access to them.
-
- // Should not need a doPriv getting this class' classloader
- ClassLoader cl = AutomaticManagedRuntime.class.getClassLoader();
-
- Class<WASRegistryManagedRuntime> mrClass =
- (Class<WASRegistryManagedRuntime>) J2DoPrivHelper
- .getForNameAction(
- WASRegistryManagedRuntime.class.getName(),
- true, cl).run();
- mr = J2DoPrivHelper.newInstanceAction(mrClass).run();
- } catch (Throwable t) {
- // safe to ignore
- }
- WAS_REG = (WASRegistryManagedRuntime) mr;
}
private Configuration _conf = null;
@@ -150,20 +129,6 @@
List<Throwable> errors = new LinkedList<Throwable>();
TransactionManager tm = null;
- // Try the registry extensions first so that any applicable vendor
- // specific extensions are used.
- if (WAS_REG != null) {
- try {
- tm = WAS_REG.getTransactionManager();
- } catch (Throwable t) {
- errors.add(t);
- }
- if (tm != null) {
- _runtime = WAS_REG;
- return tm;
- }
- }
-
// Then try the registry, which is the official way to obtain
// transaction synchronication in JTA 1.1
if (REGISTRY != null) {