if (conn.getTransactionIsolation() < getTransactionLevel(config))
conn.setTransactionIsolation(getTransactionLevel(config));
//返回resource
return new XAResult(config, prepareInvoke(xaConn, xid, ai), xaConn, null, false);
} catch (SQLException e) {
throw new ActiveRecordException(e);
} catch (XAException xae) {
throw new ActiveRecordException(xae);
}
}
Boolean autoCommit = null;
try {
conn = config.getConnection();
autoCommit = conn.getAutoCommit();
config.setThreadLocalConnection(conn);
conn.setTransactionIsolation(getTransactionLevel(config)); // conn.setTransactionIsolation(transactionLevel);
conn.setAutoCommit(false);
xaConn = (XAConnection) conn;
return new XAResult(config, prepareInvoke(xaConn, xid, ai), xaConn, autoCommit, true);
} catch (Exception e) {
throw new ActiveRecordException(e);
}
}