Package javax.transaction

Examples of javax.transaction.TransactionManager.suspend()


      mgr.begin();
      cache.put(fqn, key, value);
      assertEquals(value, cache.get(fqn, key));
      tx = mgr.getTransaction();
      mgr.suspend();

      mgr.begin();
      assertNull(cache.get(fqn, key));
      mgr.commit();
View Full Code Here


      SamplePojo pojo = new SamplePojo(21, "test");

      cache.put("/one/two", "key1", pojo);

      mgr.suspend();

      assertEquals(1, cache.getTransactionTable().getNumGlobalTransactions());
      assertEquals(1, cache.getTransactionTable().getNumLocalTransactions());

      assertNull(mgr.getTransaction());
View Full Code Here

      SamplePojo pojo = new SamplePojo(21, "test");

      cache.put("/one/two", "key1", pojo);

      mgr.suspend();

      assertEquals(1, cache.getTransactionTable().getNumGlobalTransactions());
      assertEquals(1, cache.getTransactionTable().getNumLocalTransactions());

      GlobalTransaction gtx = cache.getCurrentTransaction(tx, true);
View Full Code Here

      tx1 = mgr1.suspend();

      // start a tx on cache 2
      mgr2.begin();
      cache2.put(fqn, key, "value3");
      tx2 = mgr2.suspend();

      // which tx completes, which fail?
      mgr1.resume(tx1);
      // should succeed...
      mgr1.commit();
View Full Code Here

      tm.begin();
      Transaction tx = tm.getTransaction();

      cache.put(abxy, key, value);
      tm.suspend();

      // a number of random puts in unrelated sub nodes.
      cache.put(abcd, key, value + value);
      cache.put(abce, key, value);
      cache.put(abcf, key, value);
View Full Code Here

      {
         tm.begin();
         print(cache.exists("/a/b/c"));
         print("get(): " + cache.get("/a/b/c", "test"));
         print("get(): " + cache.get("/a/b/c", "test"));
         Transaction t = tm.suspend();
         try
         {
            cache.putForExternalRead(Fqn.fromString("/a/b/c"), "test", "test");
         }
         catch (Exception ignore) {
View Full Code Here

     
      cache.put(AB, "k", "v");

      tm.begin();
      assert cache.getNode(AB) != null;
      Transaction reader = tm.suspend();

      tm.begin();
      assert cache.removeNode(AB);
      assert cache.getNode(AB) == null;
      tm.commit();
View Full Code Here

            // we are done with any tx propagation setup, let's move on
            return context.proceed();
        } finally {
            // suspend the originating remote tx on this thread now that the invocation has been done
            if (originatingRemoteTx != null) {
                transactionManager.suspend();
            }
        }
    }

    /**
 
View Full Code Here

        // application class loader during the beforeDelivery call.
        previousClassLoader = doPrivileged(contextClassLoader(getApplicationClassLoader()));
        try {
            final TransactionManager tm = getTransactionManager();
            // TODO: in violation of JCA 1.6 FR 13.5.9?
            previousTx = tm.suspend();
            boolean isTransacted = service.isDeliveryTransacted(method);
            if (isTransacted) {
                tm.begin();
                currentTx = tm.getTransaction();
                if (xaRes != null)
View Full Code Here

      boolean ok;

      Transaction toResume = null;
      try
      {
         toResume = tm.suspend();

         ok = setupJMSObjects();
      }
      finally
      {
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.