bug fixed for mysql driver 6.0 xa support.

This commit is contained in:
wenshao
2017-12-02 15:52:44 +08:00
parent df8d99b468
commit cbdfd80d6e
2 changed files with 14 additions and 5 deletions
@@ -121,10 +121,10 @@ public class MySqlUtils {
// pinGlobalTxToPhysicalConnection
boolean pinGlobTx = (Boolean) method_6_getValue.invoke(
method_6_getBooleanReadableProperty.invoke(
method_6_getPropertySet.invoke(physicalConn)
, "pinGlobalTxToPhysicalConnection"
method_6_getPropertySet.invoke(physicalConn)
, "pinGlobalTxToPhysicalConnection"
)
);
);
if (pinGlobTx) {
try {
@@ -151,6 +151,11 @@ public class MySqlUtils {
}
return (XAConnection) method_6_getInstanceXA.invoke(null, physicalConn, Boolean.FALSE);
}
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
}
} catch (Exception e) {
e.printStackTrace();
method_6_getInstance_error = true;