--- /home/mkishore/TransactionImple-orig.java 2009-03-27 20:30:22.000000000 -0400 +++ src/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionImple.java 2009-05-01 16:40:52.000000000 -0400 @@ -1091,9 +1091,18 @@ if (status == javax.transaction.Status.STATUS_MARKED_ROLLBACK) { - if (XAUtils.canOptimizeDelist(xaRes)) + // modified by mohan - to ensure we handle mysql xa bugs + // - cannot re-start a suspended resource -> fails -> rollback + // - cannot end a resource that has not been started (see below) + if (true) // XAUtils.canOptimizeDelist(xaRes)) { + try { xaRes.end(info.xid(), XAResource.TMFAIL); + } catch (Exception e) { + // ignore - we are already in the cleanup phase + } + // end - modifications by mohan + xaRes.rollback(info.xid()); info.setState(TxInfo.OPTIMIZED_ROLLBACK);