PoolDescription pd = PoolHelper.getPoolDescription(poolConfig); PoolFactory dummyFactory = ((CacheCreation)dummyCache).createPoolFactory(); pd.configure(dummyFactory); String poolName = pd.getName();
PoolFactory f = this.cache.createPoolFactory(); String name = atts.getValue(NAME).trim(); stack.push(name);
PoolFactory f = this.cache.createPoolFactory(); String name = atts.getValue(NAME).trim(); stack.push(name);
public void run2() throws CacheException { createLonerDS(dsName + "_loner_ " + LONDON_CLIENT_NAME + "_vm1"); beginCacheXml(); PoolImpl pi = null; if (getTestDynamicRegions()) { CacheCreation cc = (CacheCreation)getCache(); pi = (PoolImpl)BridgeTestCase.configureConnectionPoolWithNameAndFactory(null, getServerHostName(host), bsPorts, true, -1, -1, null,"testPool",cc.createPoolFactory()); File d = new File(dsName + DYNAMIC_REGION_DIR + hydra.ProcessMgr.getProcessId()); d.mkdirs(); cc.setDynamicRegionFactoryConfig(new DynamicRegionFactory.Config(d, pi.getName(),false,true)); } else { pi = (PoolImpl)BridgeTestCase.configureConnectionPool(null, getServerHostName(host), bsPorts, true, -1, -1, null); } createParentRegionOnClient(dsName, false, pi); finishCacheXml(dsName + "_" + LONDON_CLIENT_NAME); Region r = getCache().getRegion(dsName); r.registerInterestRegex(".*"); } });
public void run2() throws CacheException { createLonerDS(dsName + "_loner_" + NYC_CLIENT_NAME + "_vm3"); beginCacheXml(); PoolImpl pi = null; if (getTestDynamicRegions()) { CacheCreation cc = (CacheCreation)getCache(); pi = (PoolImpl)BridgeTestCase.configureConnectionPoolWithNameAndFactory(null, getServerHostName(host), bsPorts, true, -1, -1, null,"testPool",cc.createPoolFactory()); File d = new File(dsName + DYNAMIC_REGION_DIR + hydra.ProcessMgr.getProcessId()); d.mkdirs(); cc.setDynamicRegionFactoryConfig(new DynamicRegionFactory.Config(d, pi.getName(),false,true)); } else { pi = (PoolImpl)BridgeTestCase.configureConnectionPool(null, getServerHostName(host), bsPorts, true, -1, -1, null); } createParentRegionOnClient(dsName, false,pi); finishCacheXml(dsName + "_" + NYC_CLIENT_NAME); Region r = getCache().getRegion(dsName); r.registerInterestRegex(".*"); } });
public void testAlreadyExistingPool() throws CacheException { getSystem(); PoolFactoryImpl f = (PoolFactoryImpl) PoolManager.createFactory(); f.setStartDisabled(true).addLocator(ALIAS2, 12345).create("mypool"); try { // now make sure declarative cache can't create the same pool CacheCreation cache = new CacheCreation(); cache.createPoolFactory().addLocator(ALIAS2, 12345).create("mypool"); try { testXml(cache); fail("expected IllegalStateException"); } catch (IllegalStateException expected) { } } finally { PoolManager.close(); } }
public void testTwoConnectionPools() throws CacheException { getSystem(); CacheCreation cache = new CacheCreation(); PoolFactory f = cache.createPoolFactory(); f.addLocator(ALIAS2, 3777).create("mypool"); f.reset().addLocator(ALIAS1, 3888).create("mypool2");
public void testDefaultConnectionPool() throws CacheException { getSystem(); CacheCreation cache = new CacheCreation(); PoolFactory f = cache.createPoolFactory(); f.addLocator(ALIAS2, 3777); f.create("mypool");
getSystem(); CacheCreation cache = new CacheCreation(); PoolFactory f = cache.createPoolFactory(); f.addLocator(ALIAS2, 3777); f.create("mypool");
public void testExplicitConnectionPool() throws CacheException { getSystem(); CacheCreation cache = new CacheCreation(); PoolFactory f = cache.createPoolFactory(); f.addServer(ALIAS2, 3777).addServer(ALIAS1, 3888); f.setFreeConnectionTimeout(12345)
getSystem(); CacheCreation cache = new CacheCreation(); PoolFactory f = cache.createPoolFactory(); f.addServer(ALIAS2, 3777).addServer(ALIAS1, 3888); f.setFreeConnectionTimeout(12345).setLoadConditioningInterval(12345)
cache.createPoolFactory() .addServer(getServerHostName(vm0.getHost()), port) .setSubscriptionEnabled(true)