conf = config; cacheManager = new CacheManager(config); xqueryCache = new XQueryPool(conf); monitor = new XQueryMonitor(); collectionsCache = new CollectionCache(this, COLLECTION_BUFFER_SIZE, 20); xmlReaderPool = new XMLReaderPool(new XMLReaderObjectFactory(this), 5, 0); syncDaemon = new SyncDaemon(); initialize();
conf = config;      syncDaemon = new SyncDaemon(); initialize();
	public BrokerPool(String id, int minBrokers, int maxBrokers, Configuration config)		throws EXistException {		instanceId = id;		min = minBrokers;		max = maxBrokers;		Integer minInt = (Integer) config.getProperty("db-connection.pool.min");		Integer maxInt = (Integer) config.getProperty("db-connection.pool.max"); 		Long syncInt = (Long) config.getProperty("db-connection.pool.sync-period");		Long maxWaitInt = (Long) config.getProperty("db-connection.pool.shutdown-wait");		if (minInt != null)			min = minInt.intValue();		if (maxInt != null)			max = maxInt.intValue();		long syncPeriod = 120000;		if (syncInt != null)			syncPeriod = syncInt.longValue();		if (maxWaitInt != null) {			maxShutdownWait = maxWaitInt.longValue();			LOG.info("Max. wait during shutdown: " + maxShutdownWait);		}		LOG.info("Instances: min = " + min + "; max = " + max + "; sync = " + syncPeriod);        		conf = config;        cacheManager = new CacheManager(config);		xqueryCache = new XQueryPool(conf);		monitor = new XQueryMonitor();		collectionsCache = new CollectionCache(this, COLLECTION_BUFFER_SIZE, 20);		xmlReaderPool = new XMLReaderPool(new XMLReaderObjectFactory(this), 5, 0);		syncDaemon = new SyncDaemon();		initialize();        if (syncPeriod > 0)            syncDaemon.executePeriodically(1000, new Sync(this, syncPeriod), false);	}