Package com.atomikos.icatch

Examples of com.atomikos.icatch.TxState


            //merely return null to avoid logging overhead
            ret = null;
         
        }
        else {
          TxState imgstate = (TxState) state;

          // System.err.println ( "Getting object image for state: " +
          // imgstate );

          if ( recoverableWhileActive_ ) {
View Full Code Here


        if ( excludedFromLogging(state)) {
            //merely return null to avoid logging overhead
            ret = null;
        }
        else {
          TxState imgstate = state;

          if ( recoverableWhileActive_ ) {
            ret = new CoordinatorLogImage ( root_, imgstate, participants_,
                superiorCoordinator_, heuristicMeansCommit_, maxNumberOfTimeoutTicksBeforeHeuristicDecision_,
                stateHandler_, localSiblingCount_, checkSiblings_ , single_threaded_2pc_);
View Full Code Here

        if ( LOGGER.isDebugEnabled() ) LOGGER.logDebug ( "Error during setRollbackOnly" , e );
        }
    }

  public TxState getStateWithTwoPhaseCommitDecision() {
    TxState ret = getState();
    if (TxState.TERMINATED.equals(getState())) {
      if (isCommitted()) ret = TxState.COMMITTED;
      else ret = TxState.ABORTED;
    } else if (TxState.HEUR_ABORTED.equals(getState())) {
      ret = TxState.ABORTED;
View Full Code Here



  @Override
  public void transitionPerformed(FSMTransitionEvent<TxState> e) {
    TxState fromState = e.fromState();
    TxState toState = e.toState();
    if (TxState.TERMINATED.equals(toState)) {
      if (TxState.COMMITTING.equals(fromState)) {
        publishDomainEvent(new TransactionCommittedEvent(root_));
      } else if (TxState.ABORTING.equals(fromState)) {
        publishDomainEvent(new TransactionAbortedEvent(root_));
View Full Code Here

 

  @Override
  public void entered(FSMEnterEvent<TxState> e) {
    TxState state = e.getState();
    if ( TxState.HEUR_ABORTED.equals(state) ||
         TxState.HEUR_COMMITTED.equals(state) ||
       TxState.HEUR_HAZARD.equals(state) ||
       TxState.HEUR_MIXED.equals(state)
      ) {
View Full Code Here

     */

    void setStateHandler ( CoordinatorStateHandler stateHandler )
    {
        // NB: if this method is synchronized then deadlock happens on heuristic mixed!
        TxState state = stateHandler.getState ();
        stateHandler_ = stateHandler;
        setState ( state );
    }
View Full Code Here

     * @see FSMPreEnterListener.
     */

    public void preEnter ( FSMEnterEvent<TxState> event ) throws IllegalStateException
    {
      TxState state = event.getState ();

        if ( state.equals ( TxState.TERMINATED )
                || state.equals ( TxState.HEUR_ABORTED )
                || state.equals ( TxState.HEUR_COMMITTED )
                || state.equals ( TxState.HEUR_HAZARD )
                || state.equals ( TxState.HEUR_MIXED ) ) {

            if ( !state.equals ( TxState.TERMINATED ) )
              LOGGER.logWarning ( "Local heuristic termination of coordinator "
                        + root_ + " with state " + getState () );
            else
                dispose ();
        }
View Full Code Here

        }

        Enumeration<TxState> enumm = forgetStates.keys ();

        while ( enumm.hasMoreElements () ) {
            TxState state = (TxState)enumm.nextElement ();
            coordinator.addFSMEnterListener ( this, state );
        }

        // on recovery, the end states might have been reached
        // BEFORE listener added -> check and remove if so.
View Full Code Here

     */

    public void entered ( FSMEnterEvent<TxState> event )
    {
        CoordinatorImp cc = (CoordinatorImp) event.getSource ();
        TxState state = event.getState ();
        removeCoordinator(cc);
    }
View Full Code Here

     */

    public synchronized void preEnter ( FSMEnterEvent<TxState> event )
            throws IllegalStateException
    {
      TxState state = event.getState ();
        StateRecoverable<TxState> source = (StateRecoverable<TxState>) event.getSource ();
        ObjectImage img = source.getObjectImage ( state );
        //if img null: do nothing (BUG FIX 10041)
        if ( img != null ) {
            StateObjectImage simg = new StateObjectImage ( img );
            TxState[] finalstates = source.getFinalStates ();
          boolean delete = false;

          for ( int i = 0; i < finalstates.length; i++ ) {
              if ( state.equals ( finalstates[i] ) )
                  delete = true;
          }

          if ( !delete )
              idToElementMap.put ( simg.getId (), simg );
View Full Code Here

TOP

Related Classes of com.atomikos.icatch.TxState

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.