List of usage examples for org.apache.commons.transaction.util.xa TransactionalResource commit
public void commit() throws XAException;
From source file:org.apache.slide.common.AbstractXAServiceBase.java
public void commit(Xid xid, boolean onePhase) throws XAException { TransactionalResource ts = getTransactionalResource(xid); if (ts == null) { throw new XAException(XAException.XAER_NOTA); }//from w ww . j a v a2s . c om if (getLoggerFacade().isFineEnabled()) { getLoggerFacade().logFine("Committing transaction branch " + ts); } if (ts.getStatus() == STATUS_MARKED_ROLLBACK) { throw new XAException(XAException.XA_RBROLLBACK); } if (ts.getStatus() != STATUS_PREPARED) { if (onePhase) { ts.prepare(); } else { throw new XAException(XAException.XAER_PROTO); } } ts.commit(); setCurrentlyActiveTransactionalResource(null); removeActiveTransactionalResource(xid); removeSuspendedTransactionalResource(xid); }