protected void createCacheManagers() throws Throwable { ConfigurationBuilder c = getConfig(); c.transaction().autoCommit(false); createClusteredCaches(2, c); }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder dsc = getDefaultStandaloneCacheConfig(true); dsc.transaction().autoCommit(false); return TestCacheManagerFactory.createCacheManager(dsc); }
public void testPreloadingWithoutAutoCommit() throws Exception { ConfigurationBuilder preloadingCfg = newPreloadConfiguration(cfg.build(), this.getClass().getName() + "preloadingCache_2"); preloadingCfg.transaction().autoCommit(false); doPreloadingTest(preloadingCfg.build(), "preloadingCache_2"); }
@Produces @ApplicationScoped public EmbeddedCacheManager create() { GlobalConfiguration global = new GlobalConfigurationBuilder() .globalJmxStatistics().cacheManagerName("geekseek") .build(); Configuration local = new ConfigurationBuilder() .clustering() .cacheMode(CacheMode.LOCAL) .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .transactionManagerLookup(new GenericTransactionManagerLookup()) .autoCommit(false) .build(); return new DefaultCacheManager(global, local); }
@Test public void testDistSyncAutoCommit() { Configuration configuration = new ConfigurationBuilder() .clustering().cacheMode(CacheMode.DIST_SYNC) .transaction().autoCommit(true) .build(); Assert.assertTrue(configuration.transaction().autoCommit()); Assert.assertEquals(configuration.clustering().cacheMode(), CacheMode.DIST_SYNC); }
@Override public EmbeddedCacheManager createCacheManager() { final ConfigurationBuilder defaultConfiguration = getDefaultCacheConfiguration(true); defaultConfiguration.invocationBatching().enable().transaction().autoCommit(false); return TestCacheManagerFactory.createCacheManager(defaultConfiguration); }
@BeforeMethod public void setUp() throws Exception { ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(true); builder.transaction().autoCommit(false) .clustering().cacheMode(CacheMode.LOCAL) .locking().isolationLevel(IsolationLevel.REPEATABLE_READ); cm = TestCacheManagerFactory.createCacheManager(builder); cache = cm.getCache(); tm = TestingUtil.getTransactionManager(cache); mockNotifier = mock(CacheNotifier.class); origNotifier = TestingUtil.replaceComponent(cache, CacheNotifier.class, mockNotifier, true); }
switch (attribute) { case AUTO_COMMIT: builder.transaction().autoCommit(Boolean.parseBoolean(value)); break; case CACHE_STOP_TIMEOUT:
.use1PcForAutoCommitTransactions(false).autoCommit(false);
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder configuration = defaultRecoveryConfig(); configuration.transaction().autoCommit(false); configuration.locking().isolationLevel(IsolationLevel.READ_COMMITTED); //skip WSC exceptions createCluster(configuration, 3); waitForClusterToForm(); key = getKey(); failureInterceptor0 = new InDoubtWithCommitFailsTest.ForceFailureInterceptor(); failureInterceptor1 = new InDoubtWithCommitFailsTest.ForceFailureInterceptor(); advancedCache(0).getAsyncInterceptorChain().addInterceptorAfter(failureInterceptor0, InvocationContextInterceptor.class); advancedCache(1).getAsyncInterceptorChain().addInterceptorAfter(failureInterceptor1, InvocationContextInterceptor.class); }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder(); gcb.globalJmxStatistics().jmxDomain(JMX_DOMAIN).mBeanServerLookup(new PerThreadMBeanServerLookup()).enable(); ConfigurationBuilder dcc = TestCacheManagerFactory.getDefaultCacheConfiguration(true); dcc.transaction().autoCommit(false); dcc.memory().size(1000); dcc.jmxStatistics().enable(); server = PerThreadMBeanServerLookup.getThreadMBeanServer(); return new DefaultCacheManager(gcb.build(), dcc.build()); }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder(); gcb.globalJmxStatistics().jmxDomain(JMX_DOMAIN).mBeanServerLookup(new PerThreadMBeanServerLookup()).enable(); ConfigurationBuilder dcc = TestCacheManagerFactory.getDefaultCacheConfiguration(true); dcc.transaction().autoCommit(false); dcc.memory().size(1000); dcc.jmxStatistics().enable(); server = PerThreadMBeanServerLookup.getThreadMBeanServer(); return new DefaultCacheManager(gcb.build(), dcc.build()); }
.use1PcForAutoCommitTransactions(false).autoCommit(false);
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder builder = new ConfigurationBuilder(); if (mode.isClustered()) { builder.clustering().cacheMode(mode); } builder .jmxStatistics().enable() .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .autoCommit(autoCommit) .locking().isolationLevel(IsolationLevel.READ_COMMITTED); EmbeddedCacheManager cm = TestCacheManagerFactory.createClusteredCacheManager(builder); timeService = new ControlledTimeService(); TestingUtil.replaceComponent(cm, TimeService.class, timeService, true); return cm; }