Package com.arjuna.ats.internal.jta.transaction.arjunacore

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple.begin()


         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);

         mgr.rollback();

         mgr.begin();

         tx = mgr.getTransaction();

         tx.enlistResource(res);
View Full Code Here


         consumerSess = xaConn.createXASession();

         consumer = consumerSess.createConsumer(HornetQServerTestCase.queue1);

         mgr.begin();

         tx = mgr.getTransaction();

         tx.enlistResource(res);
View Full Code Here

        final LastOnePhaseResource firstResource = new LastOnePhaseResource() ;
        final LastOnePhaseResource secondResource = new LastOnePhaseResource() ;
        final LastOnePhaseResource thirdResource = new LastOnePhaseResource() ;
       
        final TransactionManager tm = new TransactionManagerImple() ;
        tm.begin() ;
        try
        {
            final Transaction tx = tm.getTransaction() ;
            assertTrue("First resource enlisted", tx.enlistResource(firstResource)) ;
            assertTrue("Second resource enlisted", tx.enlistResource(secondResource)) ;
View Full Code Here

    {
        final LastOnePhaseResource firstResource = new LastOnePhaseResource() ;
        final LastOnePhaseResource secondResource = new LastOnePhaseResource() ;
       
        final TransactionManager tm = new TransactionManagerImple() ;
        tm.begin() ;
        try
        {
            final Transaction tx = tm.getTransaction() ;
            assertTrue("First resource enlisted", tx.enlistResource(firstResource)) ;
            assertFalse("Second resource enlisted", tx.enlistResource(secondResource)) ;
View Full Code Here

public class TestSetTransactionTimeout extends TestCase {
  public void test() throws NotSupportedException,
      SystemException, IllegalStateException, RollbackException {
    javax.transaction.TransactionManager tm = new TransactionManagerImple();

    tm.begin();

    javax.transaction.Transaction theTransaction = tm.getTransaction();
    theTransaction.enlistResource(new XAResource() {

      public void commit(Xid arg0, boolean arg1) throws XAException {
View Full Code Here

  }

  @Test
  public void testJBossTS() throws Exception {
    TransactionManagerImple tm = new TransactionManagerImple();
    tm.begin();
    EntityManager em = factory.createEntityManager();
    Tweet tweet = new Tweet( "Spice is the essence of life" );
    em.persist( tweet );
    tm.commit();
    em.close();
View Full Code Here

    Tweet tweet = new Tweet( "Spice is the essence of life" );
    em.persist( tweet );
    tm.commit();
    em.close();

    tm.begin();
    em = factory.createEntityManager();
    FullTextEntityManager ftem = Search.getFullTextEntityManager( em );
    final QueryBuilder builder = ftem.getSearchFactory().buildQueryBuilder().forEntity( Tweet.class ).get();
    final Query query = builder
        .keyword()
View Full Code Here

         MessageConsumer consumer = consumerSess.createConsumer(HornetQServerTestCase.queue1);
         xaConn.start();

         DummyXAResource res = new DummyXAResource();

         mgr.begin();

         tx = mgr.getTransaction();

         tx.enlistResource(res);
View Full Code Here

         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);

         mgr.rollback();

         mgr.begin();

         tx = mgr.getTransaction();

         tx.enlistResource(res);
View Full Code Here

         tx.delistResource(consumerSess.getXAResource(), XAResource.TMSUCCESS);

         mgr.rollback();

         mgr.begin();

         tx = mgr.getTransaction();

         tx.enlistResource(res);
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.