Package org.mule.api.transaction

Examples of org.mule.api.transaction.Transaction.rollback()


        SpringTransactionFactory factory = new SpringTransactionFactory();
        factory.setManager((PlatformTransactionManager)mockPTM.proxy());

        Transaction tx = factory.beginTransaction(muleContext);
//        TransactionCoordination.getInstance().bindTransaction(tx);
        tx.rollback();
    }

}
View Full Code Here


        Transaction tx = TransactionCoordination.getInstance().getTransaction();
        if (tx != null)
        {
            try
            {
                tx.rollback();
               
                // TODO The following was in the catch clause of TransactionTemplate previously. 
                // Do we need to do this here?  If so, where can we store these variables (suspendedXATx, joinedExternal)
                // so that they are available to us in the exception handler?
                //
View Full Code Here

        }, transaction.getId());


        transaction.begin();
        transaction.commit();
        transaction.rollback();

        // Wait for the notifcation event to be fired as they are queued
        latch.await(2000, TimeUnit.MILLISECONDS);
        assertEquals("There are still some notifications left unfired.", 0, latch.getCount());
    }
View Full Code Here

        Transaction tx = TransactionCoordination.getInstance().getTransaction();
        if (tx != null)
        {
            try
            {
                tx.rollback();

                // TODO The following was in the catch clause of TransactionTemplate previously.
                // Do we need to do this here?  If so, where can we store these variables (suspendedXATx, joinedExternal)
                // so that they are available to us in the exception handler?
                //
View Full Code Here

        Transaction tx = transactions.get();
        if (tx != null)
        {
            try
            {
                tx.rollback();
            }
            catch (TransactionException e)
            {
                logger.error(e);
            }
View Full Code Here

        {
            if (logger.isDebugEnabled())
            {
                logger.debug("Transaction has been marked rollbackOnly, rolling it back: " + tx);
            }
            tx.rollback();
        }
        else
        {
            if (logger.isDebugEnabled())
            {
View Full Code Here

        }, transaction.getId());


        transaction.begin();
        transaction.commit();
        transaction.rollback();

        // Wait for the notifcation event to be fired as they are queued
        latch.await(2000, TimeUnit.MILLISECONDS);
        assertEquals("There are still some notifications left unfired.", 0, latch.getCount());
    }
View Full Code Here

        SpringTransactionFactory factory = new SpringTransactionFactory();
        factory.setManager(mockPTM);

        Transaction tx = factory.beginTransaction(muleContext);
        tx.rollback();

        verify(mockPTM).rollback(mockTS);
        verify(mockTS).setRollbackOnly();
    }
}
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.