Package org.infinispan.transaction.lookup

Examples of org.infinispan.transaction.lookup.DummyTransactionManagerLookup


   public void testTransactionalityInduced() {
      Configuration c = new Configuration();
      assert !c.isTransactionalCache();

      c.setTransactionManagerLookup(new DummyTransactionManagerLookup());
      assert c.isTransactionalCache();

      c = new Configuration();
      assert !c.isTransactionalCache();

      c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
      assert c.isTransactionalCache();

      c = new Configuration();
      assert !c.isTransactionalCache();

      c.fluent().transaction().transactionManagerLookup(new DummyTransactionManagerLookup());
      assert c.isTransactionalCache();

      c = new Configuration();
      assert !c.isTransactionalCache();
View Full Code Here


   }

   public void testOverride() {
      final Configuration c = new Configuration();
      c.fluent().transaction().transactionMode(TransactionMode.TRANSACTIONAL)
            .transactionManagerLookup(new DummyTransactionManagerLookup());

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createCacheManager()){
         @Override
         public void call() {
            cm.defineConfiguration("transactional", c);
View Full Code Here

      // default cache with no overrides
      Cache c = cm.getCache();

      Configuration overrides = TestCacheManagerFactory.getDefaultConfiguration(true);
      overrides.setTransactionManagerLookup(new DummyTransactionManagerLookup());
      cm.defineConfiguration("transactional", overrides);
      Cache transactional = cm.getCache("transactional");

      // assert components.
      assert TestingUtil.extractComponent(c, TransactionManager.class) == null;
View Full Code Here

   @Override
   protected void createCacheManagers() throws Throwable {
      Configuration defaultConfig = getDefaultConfig();
      defaultConfig.setLockAcquisitionTimeout(500);
      defaultConfig.fluent().transaction().transactionManagerLookup(new DummyTransactionManagerLookup());
      defaultConfig.setUseLockStriping(false);
      addClusterEnabledCacheManager(defaultConfig);
      addClusterEnabledCacheManager(defaultConfig);
      lm0 = TestingUtil.extractLockManager(cache(0));
      lm1 = TestingUtil.extractLockManager(cache(1));
View Full Code Here

   @Override
   protected void createCacheManagers() {
      cacheConfigBuilder = getDefaultClusteredCacheConfig(cacheMode, isTransactional, true);
      if (isTransactional) {
         cacheConfigBuilder.transaction().transactionMode(TransactionMode.TRANSACTIONAL)
               .transactionManagerLookup(new DummyTransactionManagerLookup())
               .syncCommitPhase(true).syncRollbackPhase(true);

         if (isOptimistic) {
            cacheConfigBuilder.transaction().lockingMode(LockingMode.OPTIMISTIC)
                  .locking().writeSkewCheck(true).isolationLevel(IsolationLevel.REPEATABLE_READ)
View Full Code Here

      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

   protected ConfigurationBuilder buildConfiguration() {
      final ConfigurationBuilder conf = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true);
      conf.transaction()
            .lockingMode(LockingMode.PESSIMISTIC)
            .transactionManagerLookup(new DummyTransactionManagerLookup())
         .locking().lockAcquisitionTimeout(10L); //fail fast
      return conf;
   }
View Full Code Here

   }

   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

   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

   protected ConfigurationBuilder buildConfiguration() {
      final ConfigurationBuilder conf = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true);
      conf.transaction()
            .lockingMode(LockingMode.PESSIMISTIC)
            .transactionManagerLookup(new DummyTransactionManagerLookup())
         .locking().lockAcquisitionTimeout(10L); //fail fast
      return conf;
   }
View Full Code Here

TOP

Related Classes of org.infinispan.transaction.lookup.DummyTransactionManagerLookup

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.