Package javax.transaction

Examples of javax.transaction.TransactionManager.resume()


                    .getManagedRuntimeInstance().getTransactionManager();
                tm.commit();
                try { conn.close(); } catch (SQLException se) {}

                if (_outerTransaction != null)
                    tm.resume(_outerTransaction);

            } catch (Exception e) {
                throw new StoreException(e);
            } finally {
                _outerTransaction = null;
View Full Code Here


        try {
            TransactionManager txMgr = TransactionFactory.getTransactionManager();
            if (txMgr != null) {
                setTransactionBeginStack(popTransactionBeginStackSave());
                setSetRollbackOnlyCause(popSetRollbackOnlyCauseSave());
                txMgr.resume(parentTx);
                removeSuspendedTransaction(parentTx);
            }
        } catch (InvalidTransactionException e) {
            /* NOTE: uncomment this for Weblogic Application Server
            // this is a work-around for non-standard Weblogic functionality; for more information see: http://www.onjava.com/pub/a/onjava/2005/07/20/transactions.html?page=3
View Full Code Here

      tm.begin();
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      final Transaction tx2 = tm.suspend();

      tm.resume(tx1);
      atomicMap.put("k1", "v2");
      tm.commit();

      tm.resume(tx2);
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
View Full Code Here

      tm.resume(tx1);
      atomicMap.put("k1", "v2");
      tm.commit();

      tm.resume(tx2);
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      atomicMap.put("k1", "v3");
      try {
         tm.commit();
         fail();
View Full Code Here

      Transaction tx = tm.suspend();


      assertInitialValues(c1, c1Replica, c2, c2Replica);

      tm.resume(tx);
      log.trace("before commit...");
      tm.commit();


      assert c1.get("c1key").equals("c1value_new");
View Full Code Here

      assert c1.get("c1key").equals("c1value");
      assert c1Replica.get("c1key").equals("c1value");
      assert c2.get("c2key").equals("c2value");
      assert c2Replica.get("c2key").equals("c2value");

      tm.resume(tx);
      tm.rollback();

      assert c1.get("c1key").equals("c1value");
      assert c1Replica.get("c1key").equals("c1value");
      assert c2.get("c2key").equals("c2value");
View Full Code Here

      Map<Object, Object> modifiedMap = createMap("k1", "v1", "k2", "v2", "k3", "v3");
      assertMap(modifiedMap, writeMap);
      tm1.commit();

      // tx2
      tm2.resume(tx2);
      // a new FGAM referring to the same key should not see the entries committed by tx3
      assertMap(initialMap, readMap);
      tm2.commit();

      // tx4
View Full Code Here

      tm.begin();
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      final Transaction tx2 = tm.suspend();

      tm.resume(tx1);
      atomicMap.put("k1", "v2");
      tm.commit();

      tm.resume(tx2);
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
View Full Code Here

      tm.resume(tx1);
      atomicMap.put("k1", "v2");
      tm.commit();

      tm.resume(tx2);
      AssertJUnit.assertEquals("v1", atomicMap.get("k1"));
      atomicMap.put("k1", "v3");
      try {
         tm.commit();
         fail();
View Full Code Here

        }
      }
      finally {
        if ( surroundingTransaction != null ) {
          try {
            transactionManager.resume( surroundingTransaction );
            if ( log.isDebugEnabled() ) {
              log.debug( "surrounding JTA transaction resumed [" + surroundingTransaction + "]" );
            }
          }
          catch( Throwable t ) {
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.