Examples of DummyTransactionManagerLookup


Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

      Configuration c = new Configuration();
      c.setLockAcquisitionTimeout(500);
      // these 2 need to be set to use the AtomicMapCache
      c.setInvocationBatchingEnabled(true);
      c.fluent()
            .transaction().transactionManagerLookup(new DummyTransactionManagerLookup())
            .lockingMode(LockingMode.PESSIMISTIC);

      cm = TestCacheManagerFactory.createCacheManager(c);
      cache = cm.getCache();
      tm = TestingUtil.getTransactionManager(cache);
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

   }

   protected Configuration buildConfiguration() {
      final Configuration c = getDefaultClusteredConfig(cacheMode);
      c.fluent().
            transaction().transactionManagerLookup(new DummyTransactionManagerLookup())
            .useSynchronization(useSynchronization)
            .lockingMode(lockingMode);
      c.fluent().hash()
            .rehashEnabled(false)
            .numOwners(3);
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

   protected void createCacheManagers() throws Throwable {
      c = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true);
      c.fluent()
            .transaction()
               .lockingMode(LockingMode.PESSIMISTIC)
               .transactionManagerLookup(new DummyTransactionManagerLookup());
      c.fluent().hash().numOwners(3);
      createCluster(c, 2);
      waitForClusterToForm();
   }
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

      return Configuration.CacheMode.REPL_SYNC;
   }

   protected void createCacheManagers() throws Throwable {
      Configuration cfg = getDefaultClusteredConfig(getCacheMode(), true);
      cfg.fluent().transactionManagerLookup(new DummyTransactionManagerLookup()).lockingMode(LockingMode.PESSIMISTIC);
      cfg.setLockAcquisitionTimeout(500);
      createClusteredCaches(2, "testcache", cfg);
      waitForClusterToForm("testcache");
   }
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

   protected final void createCacheManagers() throws Throwable {
      assert cacheMode != null && lockingMode != null && useSynchronization != null;
      final Configuration config = getDefaultClusteredConfig(cacheMode, true);
      config.fluent().transaction()
            .transactionMode(TransactionMode.TRANSACTIONAL)
            .transactionManagerLookup(new DummyTransactionManagerLookup())
            .lockingMode(lockingMode)
            .useSynchronization(useSynchronization);
      config.fluent().hash().numOwners(3).locking().lockAcquisitionTimeout(2000L);
      createCluster(config, 3);
      waitForClusterToForm();
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

            .stateTransfer().fetchInMemoryState(true)
            .locking().lockAcquisitionTimeout(1000l).supportsConcurrentUpdates(supportsConcurrentUpdates);

      if (transactional) {
         builder.transaction().transactionMode(TransactionMode.TRANSACTIONAL)
               .transactionManagerLookup(new DummyTransactionManagerLookup())
               .syncCommitPhase(true).syncRollbackPhase(true)
               .lockingMode(optimistic ? LockingMode.OPTIMISTIC : LockingMode.PESSIMISTIC);
      }
   }
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

            }
         };
      } else {
         System.out.println("Transaction manager used: Dummy");
         final String lookup = DummyTransactionManagerLookup.class.getName();
         final DummyTransactionManagerLookup instance = new DummyTransactionManagerLookup();
         operations = new Operations() {
            public UserTransaction getUserTransaction() {
               return instance.getUserTransaction();
            }

            public void cleanup() {
               instance.cleanup();
            }

            public String getLookup() {
               return lookup;
            }

            public TransactionManager getManager() {
               try {
                  return instance.getTransactionManager();
               }
               catch (Exception e) {
                  throw new RuntimeException(e);
               }
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

      return Configuration.CacheMode.REPL_SYNC;
   }

   protected void createCacheManagers() throws Throwable {
      Configuration cfg = getDefaultClusteredConfig(getCacheMode(), true);
      cfg.fluent().transaction().transactionManagerLookup(new DummyTransactionManagerLookup());
      cfg.setLockAcquisitionTimeout(500);
      cfg.setUseEagerLocking(true);
      createClusteredCaches(2, "testcache", cfg);
   }
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC,true)
            .fluent()
               .locking()
                  .isolationLevel(IsolationLevel.REPEATABLE_READ)
                  .lockAcquisitionTimeout(60000l)
               .transaction().transactionManagerLookup(new DummyTransactionManagerLookup())
            .build();
      createClusteredCaches(2, "syncReplCache", configuration);
      waitForClusterToForm("syncReplCache");

      Configuration noTx = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC,false)
            .fluent()
               .locking()
                  .isolationLevel(IsolationLevel.REPEATABLE_READ)
                  .lockAcquisitionTimeout(60000l).build();

      defineConfigurationOnAllManagers("syncReplCacheNoTx", noTx);

      Configuration replAsync = getDefaultClusteredConfig(Configuration.CacheMode.REPL_ASYNC,true);
      defineConfigurationOnAllManagers("asyncReplCache", replAsync);

      Configuration replAsyncNoTx = getDefaultClusteredConfig(Configuration.CacheMode.REPL_ASYNC,false);
      defineConfigurationOnAllManagers("asyncReplCacheNoTx", replAsyncNoTx);

      Configuration replQueue = getDefaultClusteredConfig(Configuration.CacheMode.REPL_ASYNC,true)
            .fluent()
               .clustering()
                  .async()
                     .useReplQueue(true)
               .transaction().transactionManagerLookup(new DummyTransactionManagerLookup())
            .build();
      defineConfigurationOnAllManagers("replQueueCache", replQueue);

      Configuration asyncMarshall = getDefaultClusteredConfig(Configuration.CacheMode.REPL_ASYNC,true)
            .fluent()
               .clustering()
                  .async()
                     .asyncMarshalling(true)
               .transaction().transactionManagerLookup(new DummyTransactionManagerLookup())
            .build();
      defineConfigurationOnAllManagers("asyncMarshallCache", asyncMarshall);
   }
View Full Code Here

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

   private ConfigurationBuilder dcc;

   @Override
   protected void createCacheManagers() throws Throwable {
      dcc = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true);
      dcc.transaction().transactionManagerLookup(new DummyTransactionManagerLookup());
      dcc.clustering().hash().numOwners(1);
      dcc.clustering().stateTransfer().fetchInMemoryState(true);
      createCluster(dcc, 2);
      waitForClusterToForm();
   }
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.