Package org.jboss.cache.transaction

Examples of org.jboss.cache.transaction.DummyTransactionManager.begin()


      // evict from cache
      mgr.begin();
      cache.evict(fqn);
      mgr.commit();

      mgr.begin();
      // should now be passivated in the loader
      // don't do a cache.get() first as this will activate this node from the loader again!
      // assertNull( cache.get( fqn ) );
      assertEquals(value, loader.get(fqn).get(key));
View Full Code Here


      // and the object should now be removed from the loader
      assertNull(loader.get(fqn));
      mgr.commit();

      // clean up
      mgr.begin();
      cache.removeNode(fqn);
      loader.remove(fqn);
      mgr.commit();

   }
View Full Code Here

      assertTrue(loader.exists(Fqn.fromString("/a/3")));
      cache.evict(Fqn.fromString("/a"));// passivate node
      assertTrue(loader.exists(Fqn.fromString("/a")));
      addDelay();
      DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();
      mgr.getTransaction();
      Set<?> children = cache.getNode("/a").getChildrenNames();
      assertEquals(3, children.size());
      assertTrue(children.contains("1"));
      assertTrue(children.contains("2"));
View Full Code Here

   {
      CacheSPI<Object, Object> cache = cacheTL.get();
      CacheLoader loader = loaderTL.get();

      DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();

      cache.put("/one/two/three", "key1", "val1");
      cache.put("/one/two/three/four", "key2", "val2");

      mgr.commit();
View Full Code Here

      mgr.commit();

      assertNotNull(cache.getNode("/one/two/three").getKeys());
      assertEquals("val1", cache.get(Fqn.fromString("/one/two/three"), "key1"));
      mgr.begin();

      cache.evict(Fqn.fromString("/one/two/three"));
      cache.evict(Fqn.fromString("/one/two/three/four"));

      mgr.commit();
View Full Code Here

      DummyTransactionManager mgr = DummyTransactionManager.getInstance();

      cache.removeNode("/one");
      addDelay();
      mgr.begin();

      cache.put("/one/two/three", "key1", "val1");
      cache.put("/one/two/three/four", "key2", "val2");
      mgr.rollback();
      addDelay();
View Full Code Here

   public void testBasicOperationsTransactional()
         throws Exception
   {

      DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();
      doTestBasicOperations();
      mgr.commit();
   }

   /**
 
View Full Code Here

    */
   public void testModificationsTransactional()
         throws Exception
   {
      DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();
      doTestModifications();
      mgr.commit();
   }

   /**
 
View Full Code Here

      assertTrue(loader.exists(Fqn.fromString("/a/3")));
      cache.evict(Fqn.fromString("/a"));// passivate node
      assertTrue(loader.exists(Fqn.fromString("/a")));
      addDelay();
      DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();
      mgr.getTransaction();
      Set<?> children = cache.getNode("/a").getChildrenNames();
      assertEquals(3, children.size());
      assertTrue(children.contains("1"));
      assertTrue(children.contains("2"));
View Full Code Here


   public void testTxPutCommit() throws Exception
   {
      DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();

      cache.put("/one/two/three", "key1", "val1");
      cache.put("/one/two/three/four", "key2", "val2");

      mgr.commit();
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.