Examples of addSubTxAwareParticipant()


Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

    private void restoreThreadMappings ( Stack stack , Thread thread )
            throws IllegalStateException
    {
      //case 21806: callbacks to ct to be made outside synchronized block
      CompositeTransaction tx = (CompositeTransaction) stack.peek ();
      tx.addSubTxAwareParticipant ( this ); //step 1
     
        synchronized ( threadtotxmap_ ) {
          //between step 1 and here, intermediate timeout/rollback of the ct
          //may have happened; make sure to check or we add a thread mapping
          //that will never be removed!
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

    {
        // argument is not null on test!
        CompositeTransaction ct = null;
        ct = ct_.getTransactionService ().createSubTransaction ( ct_ );
        // we want to be notified of subtx commit for handling extents
        ct.addSubTxAwareParticipant ( this );
        localIncSubTxCount();
        return ct;
    }

    // this method should NOT be synchronized, to avoid deadlocks in JBoss
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

            resumeParticipant = new ResumePreviousTransactionSubTxAwareParticipant ( ct );
        }
       
        try {
            ct = ctm_.createCompositeTransaction ( ( ( long ) timeout ) * 1000 );
            if ( resumeParticipant != null ) ct.addSubTxAwareParticipant ( resumeParticipant );
            if ( ct.isRoot () && getDefaultSerial () )
                ct.getTransactionControl ().setSerial ();
            ct.setProperty ( JTA_PROPERTY_NAME , "true" );
        } catch ( SysException se ) {
          String msg = "Error in begin()";
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

        }
        // a new tx can not be in the map yet.
        // next, we put it there.
        tx = new TransactionImp ( ct, automaticResourceRegistration_ );
        addToMap ( ct.getTid (), tx );
        ct.addSubTxAwareParticipant ( this );
    }

    /**
     * @see javax.transaction.TransactionManager
     */
 
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

            ret = getPreviousInstance ( ct.getTid () );
            if ( ret == null && ct.getState ().equals ( TxState.ACTIVE ) ) {
                // happens for JTS imported txs
                ret = new TransactionImp ( ct, automaticResourceRegistration_ );
                addToMap ( ct.getTid (), ret );
                ct.addSubTxAwareParticipant ( this );
            }

        }
        return ret;
    }
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

    private void restoreThreadMappings ( Stack stack , Thread thread )
            throws IllegalStateException
    {
      //case 21806: callbacks to ct to be made outside synchronized block
      CompositeTransaction tx = (CompositeTransaction) stack.peek ();
      tx.addSubTxAwareParticipant ( this ); //step 1

        synchronized ( threadtotxmap_ ) {
          //between step 1 and here, intermediate timeout/rollback of the ct
          //may have happened; make sure to check or we add a thread mapping
          //that will never be removed!
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

            throws SysException, IllegalStateException
    {
        CompositeTransaction ct = null;
        ct = ct_.getTransactionService ().createSubTransaction ( ct_ );
        // we want to be notified of subtx commit for handling extents
        ct.addSubTxAwareParticipant ( this );
        localIncSubTxCount();
        return ct;
    }

    // this method should NOT be synchronized, to avoid deadlocks in JBoss
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

            resumeParticipant = new ResumePreviousTransactionSubTxAwareParticipant ( ct );
        }
       
        try {
            ct = compositeTransactionManager.createCompositeTransaction ( ( ( long ) timeout ) * 1000 );
            if ( resumeParticipant != null ) ct.addSubTxAwareParticipant ( resumeParticipant );
            if ( ct.isRoot () && getDefaultSerial () )
                ct.getTransactionControl ().setSerial ();
            ct.setProperty ( JTA_PROPERTY_NAME , "true" );
        } catch ( SysException se ) {
          String msg = "Error in begin()";
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

            resumeParticipant = new ResumePreviousTransactionSubTxAwareParticipant ( ct );
        }
       
        try {
            ct = ctm_.createCompositeTransaction ( ( ( long ) timeout ) * 1000 );
            if ( resumeParticipant != null ) ct.addSubTxAwareParticipant ( resumeParticipant );
            if ( ct.isRoot () && getDefaultSerial () )
                ct.getTransactionControl ().setSerial ();
            ct.setProperty ( JTA_PROPERTY_NAME , "true" );
        } catch ( SysException se ) {
          String msg = "Error in begin()";
View Full Code Here

Examples of com.atomikos.icatch.CompositeTransaction.addSubTxAwareParticipant()

        }
        // a new tx can not be in the map yet.
        // next, we put it there.
        tx = new TransactionImp ( ct, automaticResourceRegistration_ );
        addToMap ( ct.getTid (), tx );
        ct.addSubTxAwareParticipant ( this );
    }

    /**
     * @see javax.transaction.TransactionManager
     */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.