Package com.atomikos.icatch

Examples of com.atomikos.icatch.Synchronization


        // associated with the tx at beforeCompletion, and the
        // TM is listening as a SubTxAware!
        // NOTE: doing this at the very beginning of commit
        // also makes sure that the tx can still get new Participants
        // from beforeCompletion work being done! This is required.
        Synchronization sync = null;
        Enumeration enumm = synchronizations_.elements ();
        while ( enumm.hasMoreElements () ) {
          sync = (Synchronization) enumm.nextElement ();
          try {
            sync.beforeCompletion ();
          } catch ( RuntimeException error ) {
            //see case 24246: rollback only
            setRollbackOnly();
            Configuration.logWarning ( "Unexpected error in beforeCompletion: " , error );
          }
View Full Code Here


    }

    protected void addSynchronizations ( Stack synchronizations )
    {
        while ( !synchronizations.empty () ) {
            Synchronization next = (Synchronization) synchronizations.pop ();
            localPushSynchronization ( next );
        }
    }
View Full Code Here

    /**
     * Should be called instead of iterator: commit can add more synchronizations
     * so an iterator would give ConcurrentModificationException!
     */
    private Synchronization localPopSynchronization() {
      Synchronization ret = null;
      if (!synchronizations_.isEmpty()) ret = synchronizations_.pop();
      return ret;
    }
View Full Code Here

        // associated with the tx at beforeCompletion, and the
        // TM is listening as a SubTxAware!
        // NOTE: doing this at the very beginning of commit
        // also makes sure that the tx can still get new Participants
        // from beforeCompletion work being done! This is required.
        Synchronization sync = null;
        Throwable cause = notifyBeforeCompletion();

        if ( ct_.getState().equals ( TxState.MARKED_ABORT ) ) {
          // happens if synchronization has called setRollbackOnly
          rollback();
View Full Code Here

    }

  private Throwable notifyBeforeCompletion() {
    Throwable cause = null;
    Synchronization sync = localPopSynchronization();
        while ( sync != null ) {
          try {
            sync.beforeCompletion ();
          } catch ( RuntimeException error ) {
            // see case 24246: rollback only
            setRollbackOnly();
            cause = error;
            LOGGER.logWarning ( "Unexpected error in beforeCompletion: " , error );
View Full Code Here

    }

    protected void addSynchronizations ( Stack<Synchronization> synchronizations )
    {
        while ( !synchronizations.isEmpty() ) {
            Synchronization next = synchronizations.pop();
            localPushSynchronization ( next );
        }
    }
View Full Code Here

        // associated with the tx at beforeCompletion, and the
        // TM is listening as a SubTxAware!
        // NOTE: doing this at the very beginning of commit
        // also makes sure that the tx can still get new Participants
        // from beforeCompletion work being done! This is required.
        Synchronization sync = null;
        Enumeration enumm = synchronizations_.elements ();
        while ( enumm.hasMoreElements () ) {
          sync = (Synchronization) enumm.nextElement ();
          try {
            sync.beforeCompletion ();
          } catch ( RuntimeException error ) {
            //see case 24246: rollback only
            setRollbackOnly();
            Configuration.logWarning ( "Unexpected error in beforeCompletion: " , error );
          }
View Full Code Here

    }

    protected void addSynchronizations ( Stack synchronizations )
    {
        while ( !synchronizations.empty () ) {
            Synchronization next = (Synchronization) synchronizations.pop ();
            localPushSynchronization ( next );
        }
    }
View Full Code Here

        // associated with the tx at beforeCompletion, and the
        // TM is listening as a SubTxAware!
        // NOTE: doing this at the very beginning of commit
        // also makes sure that the tx can still get new Participants
        // from beforeCompletion work being done! This is required.
        Synchronization sync = null;
        Enumeration enumm = synchronizations_.elements ();
        while ( enumm.hasMoreElements () ) {
          sync = (Synchronization) enumm.nextElement ();
          try {
            sync.beforeCompletion ();
          } catch ( RuntimeException error ) {
            // see case 24246: rollback only
            setRollbackOnly();
            LOGGER.logWarning ( "Unexpected error in beforeCompletion: " , error );
          }
View Full Code Here

    }

    protected void addSynchronizations ( Stack synchronizations )
    {
        while ( !synchronizations.empty() ) {
            Synchronization next = (Synchronization) synchronizations.pop();
            localPushSynchronization ( next );
        }
    }
View Full Code Here

TOP

Related Classes of com.atomikos.icatch.Synchronization

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.