for (int i = 1; i < min; i++) createBroker();
cacheManager = new CacheManager(conf); xqueryCache = new XQueryPool(conf); monitor = new XQueryMonitor(); xmlReaderPool = new XMLReaderPool(new XMLReaderObjectFactory(this), 5, 0);   File dataDir = initDataDir();   txnManager = new TransactionManager(this, dataDir, isTransactional());   collectionsCache = new CollectionCache(this, COLLECTION_BUFFER_SIZE, 20);   createBroker(); DBBroker broker = (DBBroker) pool.peek();   boolean recovered = false; if (isTransactional()) recovered = txnManager.runRecovery(broker);    if (!recovered) { try { Txn txn = txnManager.beginTransaction(); broker.getOrCreateCollection(   "/db"); txnManager.commit(txn); } catch (PermissionDeniedException e) { LOG.warn("Error during recovery 1: " + e.getMessage(), e); } }   broker.cleanUpAll();   secManager = new org.exist.security.SecurityManager(this, broker); initializing = false;  collectionConfig = new CollectionConfigurationManager(broker);  if (recovered) { try { broker.setUser(SecurityManager.SYSTEM_USER); broker.repair(); } catch (PermissionDeniedException e) { LOG.warn("Error during recovery: " + e.getMessage(), e); } }  for (int i = 1; i < min; i++) createBroker();
	protected void initialize() throws EXistException {		LOG.debug("initializing database " + instanceId);		initializing = true;		// create a first broker to initialize the security manager		createBroker();		DBBroker broker = (DBBroker) pool.peek();		broker.cleanUpAll();		secManager = new org.exist.security.SecurityManager(this, broker);		initializing = false;				collectionConfig = new CollectionConfigurationManager(broker);        		// now create remaining brokers		for (int i = 1; i < min; i++)			createBroker();        registerSystemTasks();		LOG.debug("database engine " + instanceId + " initialized.");	}