Package org.jboss.cache.transaction

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


      // now do a cache.get()...
      assertEquals(value, cache.get(fqn, key));

      // 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);
View Full Code Here


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

   }
}
View Full Code Here

      Set<?> children = cache.getNode("/a").getChildrenNames();
      assertEquals(3, children.size());
      assertTrue(children.contains("1"));
      assertTrue(children.contains("2"));
      assertTrue(children.contains("3"));
      mgr.commit();
   }
  
  
   public void testPutDataMapAfterPassivation() throws Exception
   {
View Full Code Here

      mgr.begin();

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

      mgr.commit();

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

      mgr.begin();

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

      mgr.commit();
      assertTrue(loader.exists(Fqn.fromString("/one/two/three")));
      assertTrue(loader.exists(Fqn.fromString("/one/two/three/four")));
      assertNotNull(cache.getNode("/one/two/three").getKeys());
      Set<?> children = cache.getNode("/one").getChildrenNames();
      assertEquals(1, children.size());
View Full Code Here

   {

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

   /**
    * Tests basic operations.
    */
 
View Full Code Here

         throws Exception
   {
      DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();
      doTestModifications();
      mgr.commit();
   }

   /**
    * Tests modifications.
    */
 
View Full Code Here

      Set<?> children = cache.getNode("/a").getChildrenNames();
      assertEquals(3, children.size());
      assertTrue(children.contains("1"));
      assertTrue(children.contains("2"));
      assertTrue(children.contains("3"));
      mgr.commit();
   }


   public void testPutDataMapAfterPassivation() throws Exception
   {
View Full Code Here

      mgr.begin();

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

      mgr.commit();

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

      mgr.begin();

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

      mgr.commit();
      assertTrue(loader.exists(Fqn.fromString("/one/two/three")));
      assertTrue(loader.exists(Fqn.fromString("/one/two/three/four")));
      assertNotNull(cache.getNode("/one/two/three").getKeys());
      Set<?> children = cache.getNode("/one").getChildrenNames();
      assertEquals(1, children.size());
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.