Package javax.transaction

Examples of javax.transaction.HeuristicRollbackException


      case ActionStatus.COMMITTING:
      case ActionStatus.H_COMMIT:
        break;
      case ActionStatus.ABORTED:
      case ActionStatus.ABORTING:
        throw new HeuristicRollbackException();
      case ActionStatus.H_ROLLBACK:
        throw new HeuristicRollbackException();
      case ActionStatus.H_HAZARD:
      case ActionStatus.H_MIXED:
        throw new HeuristicMixedException();
      case ActionStatus.INVALID:
        throw new IllegalStateException();
View Full Code Here


      case ActionStatus.H_COMMIT:       
        TransactionImple.removeTransaction(this);
        break;
      case ActionStatus.ABORTED:
      case ActionStatus.ABORTING:
        throw new HeuristicRollbackException();
      case ActionStatus.H_ROLLBACK:
        throw new HeuristicRollbackException();
      case ActionStatus.H_HAZARD:
      case ActionStatus.H_MIXED:
        throw new HeuristicMixedException();
      case ActionStatus.INVALID:
        TransactionImple.removeTransaction(this);
View Full Code Here

    @Test( expected = RuntimeException.class )
    public void commitWithHeuristicRollbackException()
        throws Exception
    {
        doThrow( new HeuristicRollbackException() ).when( txn ).commit();
        sut.commit();
    }
View Full Code Here

            }
        }

        if (cause != null) {
            if (cause.errorCode == XAException.XA_HEURRB) {
                throw (HeuristicRollbackException) new HeuristicRollbackException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_HEURMIX) {
                throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_RBROLLBACK
                    || cause.errorCode == XAException.XAER_RMERR
                    || cause.errorCode == XAException.XAER_NOTA) {
View Full Code Here

        }
        XAException cause = commitTask.getCause();
        boolean evercommit = commitTask.isEvercommit();
        if (cause != null) {
            if (cause.errorCode == XAException.XA_HEURRB && !evercommit) {
                throw (HeuristicRollbackException) new HeuristicRollbackException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_HEURRB && evercommit) {
                throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_HEURMIX) {
                throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause);
            } else {
View Full Code Here

    ut.getStatus();
    utControl.setReturnValue(Status.STATUS_ACTIVE, 2);
    ut.begin();
    utControl.setVoidCallable(1);
    ut.commit();
    utControl.setThrowable(new HeuristicRollbackException("heuristic exception"));
    utControl.replay();

    try {
      JtaTransactionManager ptm = newJtaTransactionManager(ut);
      TransactionTemplate tt = new TransactionTemplate(ptm);
View Full Code Here

            }
        }

        if (cause != null) {
            if (cause.errorCode == XAException.XA_HEURRB) {
                throw (HeuristicRollbackException) new HeuristicRollbackException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_HEURMIX) {
                throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_RBROLLBACK
                    || cause.errorCode == XAException.XAER_RMERR
                    || cause.errorCode == XAException.XAER_NOTA) {
View Full Code Here

        }
        XAException cause = commitTask.getCause();
        boolean evercommit = commitTask.isEvercommit();
        if (cause != null) {
            if (cause.errorCode == XAException.XA_HEURRB&& !evercommit) {
                throw (HeuristicRollbackException) new HeuristicRollbackException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_HEURRB && evercommit) {
                throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_HEURMIX) {
                throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause);
            } else {
View Full Code Here

        try {
            term.commit ();
        } catch ( HeurHazardException hh ) {
            throw new HeuristicMixedException ( hh.getMessage () );
        } catch ( HeurRollbackException hr ) {
            throw new HeuristicRollbackException ( hr.getMessage () );
        } catch ( HeurMixedException hm ) {
            throw new HeuristicMixedException ( hm.getMessage () );
        } catch ( SysException se ) {
          Configuration.logWarning ( se.getMessage() , se );
            throw new ExtendedSystemException ( se.getMessage (), se
View Full Code Here

            }
        }
       
        if (cause != null) {
            if (cause.errorCode == XAException.XA_HEURRB) {
                throw (HeuristicRollbackException) new HeuristicRollbackException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_HEURMIX) {
                throw (HeuristicMixedException) new HeuristicMixedException("Error during two phase commit").initCause(cause);
            } else if (cause.errorCode == XAException.XA_RBROLLBACK
                    || cause.errorCode == XAException.XAER_RMERR
                    || cause.errorCode == XAException.XAER_NOTA) {
View Full Code Here

TOP

Related Classes of javax.transaction.HeuristicRollbackException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.