/** * Add the <code>transaction-manager</code> creation code to the cache * creation code */ private void endCacheTransactionManager() { CacheTransactionManagerCreation txMgrCreation = (CacheTransactionManagerCreation) stack .pop(); this.cache.addCacheTransactionManagerCreation(txMgrCreation); }
/** * Add the <code>transaction-manager</code> creation code to the cache * creation code */ private void endCacheTransactionManager() { CacheTransactionManagerCreation txMgrCreation = (CacheTransactionManagerCreation) stack .pop(); this.cache.addCacheTransactionManagerCreation(txMgrCreation); }
/** * Tests transaction manager with no listener * * @since 4.0 */ public void testCacheTransactionManager() { CacheCreation cache = new CacheCreation(); CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation(); cache.addCacheTransactionManagerCreation(txMgrCreation); testXml(cache); }
/** * Tests a cache listener with no parameters * * @since 4.0 */ public void testTransactionListener() { CacheCreation cache = new CacheCreation(); CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation(); txMgrCreation.setListener(new MyTestTransactionListener()); cache.addCacheTransactionManagerCreation(txMgrCreation); testXml(cache); }
txMgrCreation.addListener(l1); txMgrCreation.addListener(l2); cache.addCacheTransactionManagerCreation(txMgrCreation); testXml(cache);
/** * Tests that a region created with a named attributes set programmatically * for delta propogation has the correct attributes. * */ public void testTransactionWriter() throws CacheException { CacheCreation creation = new CacheCreation(); CacheTransactionManagerCreation ctmc = new CacheTransactionManagerCreation(); ctmc.setWriter(new TestTransactionWriter()); creation.addCacheTransactionManagerCreation(ctmc); testXml(creation); Cache c = getCache(); assertTrue(c instanceof GemFireCacheImpl); c.loadCacheXml(generate(creation)); TransactionWriter tw = c.getCacheTransactionManager().getWriter(); assertTrue("tw should be TransactionWriter, but it is:"+tw,tw instanceof TestTransactionWriter); }