Package org.jboss.cache.transaction

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


   }

   Transaction startTransaction() {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      try {
         mgr.begin();
         return mgr.getTransaction();
      }
      catch(Throwable t) {
         return null;
      }
View Full Code Here


      cache.putObject("/list", list);   // stored in cache loader
      list = (ArrayList)cache.getObject("/list");

      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      try {
         mgr.begin();
         tx=mgr.getTransaction();
         list.remove(joe);
      } catch (Exception ex)
      {
        fail("This is currently a known problem (JBCACHE-477) that we need to fix.");
View Full Code Here



   public void testTxPutCommit() throws Exception, NotSupportedException {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      Transaction tx=mgr.getTransaction();


      cache1.put(fqn, "key1", "val1");
      cache1.put("/one/two/three/four", "key2", "val2");
View Full Code Here



   public void testTxPrepareAndRollback() throws Exception, NotSupportedException {
      final DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      Transaction tx1=mgr.getTransaction();

      cache1.setLockAcquisitionTimeout(1500);
      cache2.setLockAcquisitionTimeout(1500);
View Full Code Here

      Thread locker=new Thread() {
         Transaction tx2=null;
         public void run() {
            try {
               mgr.begin();
               tx2=mgr.getTransaction();
               cache2.put(fqn, "block-key1", "block-val1"); // acquires a lock on cache2./one/two/three
               TestingUtil.sleepThread(5000);
            }
            catch(Exception e) {
View Full Code Here


   public void testPutAfterTxCommit() throws Exception, NotSupportedException
   {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      Transaction tx=mgr.getTransaction();

      cache1.put(fqn, "key1", "val1");
      assertTrue(cache1.exists(fqn));
      tx.commit();
View Full Code Here

   }

   public void testPutAfterTxRollback() throws Exception, NotSupportedException
   {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      Transaction tx=mgr.getTransaction();

      cache1.put(fqn, "key1", "val1");
      assertTrue(cache1.exists(fqn));
      tx.rollback();
View Full Code Here

      }
   }

   Transaction beginTransaction() throws SystemException, NotSupportedException {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
      mgr.begin();
      return mgr.getTransaction();
   }

   void initCaches(int caching_mode) throws Exception {
      this.caching_mode=caching_mode;
View Full Code Here

      }
   }

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

   void initCaches(int caching_mode) throws Exception {
View Full Code Here

      cache.evict(Fqn.fromString("/a"));
      addDelay();

      DummyTransactionManager mgr=DummyTransactionManager.getInstance();

       mgr.begin();
      tx=mgr.getTransaction();
      Set children=cache.getChildrenNames("/a");

       System.out.println("**** " + cache.getTransactionManager());

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.