LOG.warn("COMMIT FAILED: ", e);
rollback();
// Let them know we rolled back.
XAException xae = new XAException("COMMIT FAILED: Transaction rolled back.");
xae.errorCode = XAException.XA_RBOTHER;
xae.initCause(e);
throw xae;
}
setState(Transaction.FINISHED_STATE);
context.getTransactions().remove(xid);