Refine search
throw stateEx; case XAException.XA_HEURRB: HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; case XAException.XA_HEURMIX: HeuristicMixedException hmex = new HeuristicMixedException(); hmex.initCause(xaex); throw hmex; case XAException.XAER_INVAL:
@Override public final HeuristicRollbackException peerHeuristicRollbackException() { final HeuristicRollbackException result = new HeuristicRollbackException(String.format(getLoggingLocale(), peerHeuristicRollbackException$str())); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String failedToAcquireConnection = "WFTXN0021: Failed to acquire a connection for this operation";
protected void invokeCompensableCommitIfLocalTransaction(CompensableTransaction compensable) throws HeuristicRollbackException, SystemException { TransactionParticipant transactionCoordinator = this.beanFactory.getTransactionNativeParticipant(); Transaction transaction = compensable.getTransaction(); org.bytesoft.transaction.TransactionContext transactionContext = transaction.getTransactionContext(); TransactionXid transactionXid = transactionContext.getXid(); try { transactionCoordinator.end(transactionContext, XAResource.TMSUCCESS); transactionCoordinator.commit(transactionXid, true); } catch (XAException xaex) { switch (xaex.errorCode) { case XAException.XA_HEURCOM: transactionCoordinator.forgetQuietly(transactionXid); break; case XAException.XA_HEURRB: transactionCoordinator.forgetQuietly(transactionXid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaex); throw hrex; default: transactionCoordinator.forgetQuietly(transactionXid); // TODO SystemException sysEx = new SystemException(xaex.errorCode); sysEx.initCause(xaex); throw sysEx; } } }
throw new HeuristicMixedException(); } else if (unFinishExists) { throw new CommitRequiredException(); throw new SystemException(XAException.XAER_RMERR); } else if (rolledbackExists) { throw new HeuristicRollbackException();
} else if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) { this.participantRollback(); throw new HeuristicRollbackException(); } else if (this.transactionStatus == Status.STATUS_ROLLING_BACK) { throw new HeuristicMixedException(); } else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) { throw new HeuristicRollbackException(); } else if (this.transactionStatus == Status.STATUS_UNKNOWN) { throw new IllegalStateException(); } catch (RollbackRequiredException rrex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex;
public synchronized void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { if (this.transactionStatus == Status.STATUS_ACTIVE) { this.fireCommit(); } else if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) { this.fireRollback(); throw new HeuristicRollbackException(); } else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) /* should never happen */ { throw new RollbackException(); } else if (this.transactionStatus == Status.STATUS_COMMITTED) /* should never happen */ { logger.debug("Current transaction has already been committed."); } else { throw new IllegalStateException(); } }
Assert.fail(e.getMessage()); Assert.fail(e.getMessage());
statusRef.set(Status.STATUS_UNKNOWN); final HeuristicMixedException e = Log.log.peerHeuristicMixedException(); e.initCause(RemoteExceptionCause.readFromStream(is)); throw e; } else if (id == Protocol.P_UT_HRE_EXC) { statusRef.set(Status.STATUS_UNKNOWN); final HeuristicRollbackException e = Log.log.peerHeuristicRollbackException(); e.initCause(RemoteExceptionCause.readFromStream(is)); throw e; } else if (id == Protocol.P_UT_IS_EXC) {
public void commit(Xid xid) throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, SystemException { try { this.terminator.commit(xid, false); } catch (XAException xaex) { switch (xaex.errorCode) { case XAException.XA_HEURCOM: break; case XAException.XA_HEURMIX: throw new HeuristicMixedException(); case XAException.XA_HEURRB: throw new HeuristicRollbackException(); default: logger.error("Unknown state in committing transaction phase.", xaex); throw new SystemException(); } } catch (RuntimeException rex) { logger.error("Unknown state in committing transaction phase.", rex); throw new SystemException(); } }
throw new HeuristicRollbackException(); } else if (this.transactionStatus == Status.STATUS_ROLLING_BACK) { throw new HeuristicMixedException(); } else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) { throw new HeuristicRollbackException(); } else if (this.transactionStatus == Status.STATUS_UNKNOWN) { throw new IllegalStateException(); } catch (RollbackRequiredException rrex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex;
private static void rethrowAsJtaHeuristicRollbackException(String msg, Throwable cause) throws javax.transaction.HeuristicRollbackException { javax.transaction.HeuristicRollbackException ret = new javax.transaction.HeuristicRollbackException( msg); ret.initCause(cause); throw ret; }
} else if (transactionContext.isRollbackOnly()) { this.compensableRollback(); throw new HeuristicRollbackException();
public void put(Object key, Object value, Date expired) { Map<String, Object> map = new HashMap<String, Object>(3); map.put(RESOURCE, value); if (expired != null) { map.put(ExpirationAlgorithmConfig.EXPIRATION_KEY, expired.getTime()); } cache.put(createFqn(key), map); Transaction transaction = cache.getInvocationContext().getTransaction(); try { // TODO: to review if ((transaction != null) && (transaction.getStatus() == Status.STATUS_ACTIVE)) { transaction.commit(); } } catch (SystemException e) { LOGGER.error(e.getMessage(), e); } catch (SecurityException e) { LOGGER.error(e.getMessage(), e); } catch (IllegalStateException e) { LOGGER.error(e.getMessage(), e); } catch (RollbackException e) { LOGGER.error(e.getMessage(), e); } catch (HeuristicMixedException e) { LOGGER.error(e.getMessage(), e); } catch (HeuristicRollbackException e) { LOGGER.error(e.getMessage(), e); } }
statusRef.set(Status.STATUS_UNKNOWN); final HeuristicMixedException e = Log.log.peerHeuristicMixedException(); e.initCause(RemoteExceptionCause.readFromStream(is)); throw e; } else if (id == Protocol.P_UT_HRE_EXC) { statusRef.set(Status.STATUS_UNKNOWN); final HeuristicRollbackException e = Log.log.peerHeuristicRollbackException(); e.initCause(RemoteExceptionCause.readFromStream(is)); throw e; } else if (id == Protocol.P_UT_IS_EXC) {
case XAException.XA_HEURRB: transactionCoordinator.forgetQuietly(transactionXid); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(xaEx); throw hrex; case XAException.XA_HEURMIX: transactionCoordinator.forgetQuietly(transactionXid); HeuristicMixedException hmex = new HeuristicMixedException(); hmex.initCause(xaEx); throw hmex; case XAException.XAER_RMERR:
public void commit(Xid xid) throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, SystemException { try { this.terminator.commit(xid, false); } catch (XAException xaex) { switch (xaex.errorCode) { case XAException.XA_HEURCOM: break; case XAException.XA_HEURMIX: throw new HeuristicMixedException(); case XAException.XA_HEURRB: throw new HeuristicRollbackException(); default: logger.error("Unknown state in committing transaction phase.", xaex); throw new SystemException(); } } catch (RuntimeException rex) { logger.error("Unknown state in committing transaction phase.", rex); throw new SystemException(); } }
} else if (this.transactionStatus == Status.STATUS_MARKED_ROLLBACK) { this.participantRollback(); throw new HeuristicRollbackException(); } else if (this.transactionStatus == Status.STATUS_ROLLING_BACK) { throw new HeuristicMixedException(); } else if (this.transactionStatus == Status.STATUS_ROLLEDBACK) { throw new HeuristicRollbackException(); } else if (this.transactionStatus == Status.STATUS_UNKNOWN) { throw new IllegalStateException(); } catch (RollbackRequiredException rrex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.participantRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex; } finally {
} catch (RollbackRequiredException rrex) { this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rrex); throw hrex; } catch (SystemException ex) { this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(ex); throw hrex; } catch (RuntimeException rex) { this.fireRollback(); HeuristicRollbackException hrex = new HeuristicRollbackException(); hrex.initCause(rex); throw hrex;
this.fireCompensableRollback(compensable); failure = false; throw new HeuristicRollbackException(); } else { failure = false;
txLogger.debug("A heuristic decision was made, some relevant updates have been committed while others have been rolled back: {0}", e.getMessage()); throw new ApplicationException(new RemoteException("A heuristic decision was made, some relevant updates have been committed while others have been rolled back", e)); txLogger.debug("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back: {0}", e.getMessage()); throw new ApplicationException(new RemoteException("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back", e));