Package org.jboss.cache.transaction

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


      assertNull(loader.get(fqn));

      DummyTransactionManager mgr = DummyTransactionManager.getInstance();

      // put something in the cache
      mgr.begin();
      cache.put(fqn, key, value);
      mgr.commit();

      // should be nothing in the loader
      assertEquals(value, cache.get(fqn, key));
View Full Code Here


      // should be nothing in the loader
      assertEquals(value, cache.get(fqn, key));
      assertNull(loader.get(fqn));

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

      mgr.begin();
      // should now be passivated in the loader
View Full Code Here

      // 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

         {
            try
            {
               //start a new transaction in this thread
               DummyTransactionManager mgr = DummyTransactionManager.getInstance();
               mgr.begin();
               setTransactionsInInvocationCtx(mgr, cache);
               SamplePojo pojo = new SamplePojo(21, "test");

               cache.put("/one", "key1", pojo);
View Full Code Here

      interceptor.setNext(dummy);

      TestingUtil.replaceInterceptorChain(cache, interceptor);

      final DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();
      final Transaction tx = mgr.getTransaction();

      Runnable run = new Runnable()
      {
View Full Code Here

         {
            try
            {
               //start a new transaction in this thread
               DummyTransactionManager mgr = DummyTransactionManager.getInstance();
               mgr.begin();
               setTransactionsInInvocationCtx(mgr, cache);
               SamplePojo pojo = new SamplePojo(21, "test");

               cache.put("/one", "key1", pojo);
View Full Code Here

      interceptor.setNext(dummy);

      TestingUtil.replaceInterceptorChain(cache, interceptor);

      final DummyTransactionManager mgr = DummyTransactionManager.getInstance();
      mgr.begin();
      final Transaction tx = mgr.getTransaction();

      Runnable run = new Runnable()
      {
View Full Code Here

      assertNull(loader.get(fqn));

      DummyTransactionManager mgr = DummyTransactionManager.getInstance();

      // put something in the cache
      mgr.begin();
      cache.put(fqn, key, value);
      mgr.commit();

      // should be nothing in the loader
      assertEquals(value, cache.get(fqn, key));
View Full Code Here

      // should be nothing in the loader
      assertEquals(value, cache.get(fqn, key));
      assertNull(loader.get(fqn));

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

      mgr.begin();
      // should now be passivated in the loader
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.