log.debug("confFile set to " + confFile);
LOG.debug("confFile set to " + confFile);
    protected void startService() throws Exception {        // get path to the deploy target directory        String jbossServerDir = System.getProperty("jboss.server.home.dir");        log.debug("jbossServerDir is " + jbossServerDir + ", eXistHome is " + eXistHome);        File eXistHomeDir = new File(jbossServerDir, eXistHome);        log.debug("eXistHomeDir set to " + eXistHomeDir);        eXistHome = eXistHomeDir.getAbsolutePath();        log.debug("eXistHome set to " + eXistHome);        if (!eXistHomeDir.exists()) {            log.info("exist home directory not found at " + eXistHome + ", creating new directory");            eXistHomeDir.mkdirs();        }        System.setProperty("exist.home", eXistHome);        File dataDir = new File(eXistHomeDir, "data");        if (!dataDir.exists()) {            log.info("creating data dir in eXist home");            dataDir.mkdir();        }        confFile = new File(eXistHome, "conf.xml").getAbsolutePath();        log.debug("confFile set to " + confFile);        File f = new File(confFile);        if (!f.exists()) {            log.info("Config file does not exist, creating default configuration...");            createDefaultConfigFile(f);        }        if (!f.canRead()) {            throw new IOException("configuration file " + confFile + " is not readable");        }        configuration = new Configuration(confFile, eXistHome);        if (configuration == null) {            throw new Exception("Failed to create configuration for database");        }        if (!BrokerPool.isConfigured()) {            log.debug("Configuring database");            BrokerPool.configure(1, 5, configuration);        }    }