Package com.atomikos.icatch

Examples of com.atomikos.icatch.Participant


        Vector participants = coordinator_.getParticipants ();
        int count = (participants.size () - readOnlyTable_.size ());
        Enumeration enumm = participants.elements ();
        ForgetResult result = new ForgetResult ( count );
        while ( enumm.hasMoreElements () ) {
            Participant p = (Participant) enumm.nextElement ();
            if ( !readOnlyTable_.containsKey ( p ) ) {
                ForgetMessage fm = new ForgetMessage ( p, result );
                propagator_.submitPropagationMessage ( fm );
            }
View Full Code Here


      committed_=in.readBoolean();
      int size = in.readInt();
      readOnlyTable_ = new Hashtable<Participant, Boolean>(size);
      for (int i = 0; i < size; i++) {
      String participantClassName=in.readUTF();
      Participant participant=(Participant)ClassLoadingHelper.newInstance(participantClassName);
      ((DataSerializable)participant).readData(in);
      boolean value=in.readBoolean();
      readOnlyTable_.put(participant, value);
     
    }
View Full Code Here

    {
        if ( queried_ throw new IllegalStateException ( "Adding extent no longer allowed" );
        addRemoteParticipants ( extent.getRemoteParticipants () );
        Enumeration<Participant> enumm = extent.getParticipants ().elements ();
        while ( enumm.hasMoreElements () ) {
            Participant part =  enumm.nextElement ();
            directs_.push ( part );
        }
    }
View Full Code Here

    synchronized ( fsm_ ) {
      // cf case 61686 and case 62217: avoid concurrent enlists while recovering
      Iterator parts = getParticipants().iterator();
      while (parts.hasNext()) {
        Participant next = (Participant) parts.next();
        boolean recoveredParticipant = false;
        try {
          recoveredParticipant = next.recover();
           if ( LOGGER.isDebugEnabled() ) LOGGER.logDebug "coordinator: " + getCoordinatorId()
                + "recovered participant: " + next );
        } catch (Exception e) {
          // happens if XA connection could not be gotten or other problems
          LOGGER.logWarning("Error in recovering participant");
View Full Code Here

            // A coordinator that is still in this state might not have notified
            // all its participants -> make sure replay happens
            Enumeration enumm = getCoordinator ().getParticipants ().elements ();
            Hashtable hazards = new Hashtable ();
            while ( enumm.hasMoreElements () ) {
                Participant p = (Participant) enumm.nextElement ();
                if ( !getReadOnlyTable ().containsKey ( p ) ) {
                    addToHeuristicMap ( p, TxState.HEUR_HAZARD );
                    hazards.put ( p, TxState.HEUR_HAZARD );
                }
            }
View Full Code Here

     */

    protected Object send () throws PropagationException
    {
        try {
            Participant part = getParticipant ();
            part.forget ();

        } catch ( Exception e ) {
        }

        return getParticipant ();
View Full Code Here

          replay = true;
            int count = replayStack.size ();
            TerminationResult result = new TerminationResult ( count );

            while ( !replayStack.empty () ) {
                Participant part = (Participant) replayStack.pop ();
                if ( committed ) {
                    CommitMessage cm = new CommitMessage ( part, result, false );
                    getPropagator ().submitPropagationMessage ( cm );
                } else {
                    RollbackMessage rm = new RollbackMessage ( part, result,
View Full Code Here

         Enumeration enumm = null;
         Extent extent = ct_.getExtent ();
         if ( extent != null ) {
           enumm = extent.getParticipants ().elements ();
           while ( enumm.hasMoreElements () ) {
             Participant part = (Participant) enumm.nextElement();
             addParticipant ( part );
           }
         }

         ct_.localSetTransactionStateHandler ( new TxTerminatedStateHandler ( ct_, this, false ) );
View Full Code Here

          ct_.getCoordinatorImp().addTag(ct_.tag_);

          Enumeration enumm = ct_.getExtent().getParticipants().elements();
          while ( enumm.hasMoreElements () ) {
            Participant part = (Participant) enumm.nextElement();
            addParticipant(part);

          }
        }
View Full Code Here

     *                nature, then the error is transient.
     */

    protected Object send () throws PropagationException
    {
        Participant part = getParticipant ();
        HeuristicMessage[] msgs = null;
        try {
            msgs = part.commit ( onephase_ );
            return msgs;
        } catch ( RollbackException rb ) {
            throw new PropagationException ( rb, false );
        } catch ( HeurMixedException heurm ) {
            throw new PropagationException ( heurm, false );
        } catch ( HeurRollbackException heurr ) {
            throw new PropagationException ( heurr, false );
        } catch ( Exception e ) {
            // heuristic hazard or not, participant might be indoubt.
            // fill in exact heuristic messages by using buffer effect
            // of participant proxies.
            String msg = "Unexpected error in commit";
            LOGGER.logWarning ( msg, e );
            HeurHazardException heurh = new HeurHazardException ( part.getHeuristicMessages () );
            throw new PropagationException ( heurh, true );
        }
    }
View Full Code Here

TOP

Related Classes of com.atomikos.icatch.Participant

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.