public void commit(Xid xid, boolean onePhase) throws XAException {
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "XAResourceImpl:commit(), the xid is:" + xid + ", the onePhase:" + onePhase + " rmid=" + _rmid + " thread=" + Thread.currentThread().getId());
}
xid = createGSXid(xid);
try {
m_txnManger.commit(xid, COMMIT_ABORT_DEFAULT_TIMEOUT);
} catch (UnknownTransactionException e) {
_logger.log(Level.SEVERE, "XAResourceImpl:commit() , unknowntxnException rmid=" + _rmid + " thread=" + Thread.currentThread().getId() + " exception:" + e + e.getStackTrace());
throw createsXAException(XAException.XAER_RMERR, e);
} catch (CannotCommitException e) {
_logger.log(Level.SEVERE, "XAResourceImpl:commit() , cannotcommitException rmid=" + _rmid + " thread=" + Thread.currentThread().getId() + " exception:" + e + e.getStackTrace());
throw createsXAException(XAException.XAER_RMERR, e);
} catch (RemoteException e) {
_logger.log(Level.SEVERE, "XAResourceImpl:commit() , remoteException rmid=" + _rmid + " thread=" + Thread.currentThread().getId() + " exception:" + e + e.getStackTrace());
throw createsXAException(XAException.XAER_RMFAIL, e);
} catch (TimeoutExpiredException e) {
_logger.log(Level.SEVERE, "XAResourceImpl:commit() , timeoutexpiredException rmid=" + _rmid + " thread=" + Thread.currentThread().getId() + " exception:" + e + e.getStackTrace());
throw createsXAException(XAException.XAER_RMFAIL, e);
} finally {
_activeEmptyTransactions.remove(xid);
_suspendedXtns.remove(xid);
if (_resourcePerSingleTxn)
_relevantTx = false;
}
}