Package org.jboss.cache.transaction

Examples of org.jboss.cache.transaction.DummyTransactionManager


    * Tests basic operations with a transaction.
    */
   public void testModificationsTransactional()
      throws Exception {

      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      tx=mgr.getTransaction();
      doTestModifications();
      tx.commit();
   }
View Full Code Here


         old_factory=null;
      }
   }

   Transaction beginTransaction() throws SystemException, NotSupportedException {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      Transaction tx=mgr.getTransaction();
      return tx;
   }
View Full Code Here

      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);

      DummyTransactionManager.getInstance();
      cache1_ = initCaches();
      cache2_ = initCaches();
      tm_ = new DummyTransactionManager();
      Thread.sleep(5000);

      originalStrBuf_ = new StringBuffer();
      newStrBuf_ = new StringBuffer();
      generateString();
View Full Code Here

      oldFactory_ = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);

      DummyTransactionManager.getInstance();
      initCaches(TreeCache.LOCAL);
      tm_ = new DummyTransactionManager();

      originalStrBuf_ = new StringBuffer();
      newStrBuf_ = new StringBuffer();
      generateString();
      log("ReplicatedSyncPerfAopTest: cacheMode=ReplSync");
View Full Code Here

      oldFactory_ = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);

      DummyTransactionManager.getInstance();
      initCaches(TreeCache.LOCAL);
      tm_ = new DummyTransactionManager();

      originalStrBuf_ = new StringBuffer();
      newStrBuf_ = new StringBuffer();
      generateString();
      log("ReplicatedasyncMapPerfAopTest: cacheMode=replSync");
View Full Code Here

      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);

      DummyTransactionManager.getInstance();
      initCaches(TreeCache.LOCAL);
      nodeList_ = nodeGen(depth_, children_);
      tm_ = new DummyTransactionManager();

      log("LocalPerfAopTest: cacheMode=LOCAL, one cache");
   }
View Full Code Here

      tx.commit();
   }


   Transaction startTransaction() throws SystemException, NotSupportedException {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      Transaction tmptx=mgr.getTransaction();
      return tmptx;
   }
View Full Code Here

         fail("Test fails with exception " +ex);
      }     
   }

   Transaction beginTransaction() throws SystemException, NotSupportedException {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      Transaction tx=mgr.getTransaction();
      return tx;
   }
View Full Code Here

      cache.evict(Fqn.fromString("/a/3")); // passivate node
      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();
      tx=mgr.getTransaction();
      Set children=cache.getChildrenNames("/a");
      assertEquals(3, children.size());
      assertTrue(children.contains("1"));
      assertTrue(children.contains("2"));
      assertTrue(children.contains("3"));
View Full Code Here



   public void testTxPutCommit() throws Exception, NotSupportedException {
     
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      tx=mgr.getTransaction();
     
      cache.put("/one/two/three", "key1", "val1");
      cache.put("/one/two/three/four", "key2", "val2");
     
      tx.commit();

      assertNotNull(cache.getKeys("/one/two/three"));
      assertEquals("val1", cache.get(Fqn.fromString("/one/two/three"), "key1"));
      mgr.begin();
      tx=mgr.getTransaction();
     
      cache.evict(Fqn.fromString("/one/two/three"));
      cache.evict(Fqn.fromString("/one/two/three/four"));
     
      tx.commit();
View Full Code Here

TOP

Related Classes of org.jboss.cache.transaction.DummyTransactionManager

Copyright © 2018 www.massapicom. 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.