/** * AtomicSerial constructor * * @param arg atomic deserialization parameter * @throws IOException if there are I/O errors while reading from GetArg's * underlying <code>InputStream</code> */ public TimeoutExpiredException(GetArg arg) throws IOException, ClassNotFoundException{ super(check(arg)); committed = arg.get("committed", false); }
public void rollback(Xid xid) throws XAException { if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "XAResourceImpl:rollback(), the Xid is:" + xid + " rmid=" + _rmid + " thread=" + Thread.currentThread().getId()); } xid = createGSXid(xid); try { m_txnManger.abort(xid, COMMIT_ABORT_DEFAULT_TIMEOUT); } catch (UnknownTransactionException e) { if (failOnInvalidRollback) _logger.log(Level.SEVERE, "XAResourceImpl:rollback() , unknownTxnException rmid=" + _rmid + " thread=" + Thread.currentThread().getId() + " exception:" + e + e.getStackTrace()); throw createsXAException(XAException.XA_RBPROTO, e); } catch (CannotAbortException e) { _logger.log(Level.SEVERE, "XAResourceImpl:rollback() , CannotAbortException rmid=" + _rmid + " thread=" + Thread.currentThread().getId() + " exception:" + e + e.getStackTrace()); throw createsXAException(XAException.XA_RBPROTO, e); } catch (RemoteException e) { _logger.log(Level.SEVERE, "XAResourceImpl:rollback() , remoteException rmid=" + _rmid + " thread=" + Thread.currentThread().getId() + " exception:" + e + e.getStackTrace()); throw createsXAException(XAException.XA_RBCOMMFAIL, e); } catch (TimeoutExpiredException e) { _logger.log(Level.SEVERE, "XAResourceImpl:rollback() , timeoutException 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; } }
int prepare(long waitFor) throws CannotCommitException, UnknownTransactionException, RemoteException { try { return commitImpl(waitFor, true /*prepareOnly*/); } catch (TimeoutExpiredException ex) { throw new CannotCommitException(getExternalXid().toString() + " " + ex.toString(), ex); } }
else settler.noteUnsettledTxn(str.id); throw new TimeoutExpiredException( "timeout expired", false); } else { settler.noteUnsettledTxn(str.id); throw new TimeoutExpiredException("timeout expired", false);
throw new TimeoutExpiredException( "timeout expired", true); } else {
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; } }