try { Configuration conf = BrokerPool.getInstance().getConfiguration(); Object option = conf.getProperty("db-connection.watchdog.query-timeout"); if(option != null) timeout = ((Long)option).longValue(); if(timeout <= 0) timeout = Long.MAX_VALUE; option = conf.getProperty("db-connection.watchdog.output-size-limit"); if(option != null) maxNodesLimit = ((Integer)option).intValue(); } catch (EXistException e) { LOG.warn("configure() - Watchdog configuration failed"); }
Configuration conf = context.broker.getBrokerPool().getConfiguration(); Object option = conf.getProperty("db-connection.watchdog.query-timeout"); if(option != null) timeout = ((Long)option).longValue(); if(timeout <= 0) timeout = Long.MAX_VALUE; option = conf.getProperty("db-connection.watchdog.output-size-limit"); if(option != null) maxNodesLimit = ((Integer)option).intValue();
    private void configureDefaults() {        try {            Configuration conf = BrokerPool.getInstance().getConfiguration();            Object option = conf.getProperty("db-connection.watchdog.query-timeout");            if(option != null)                timeout = ((Long)option).longValue();            if(timeout <= 0)                timeout = Long.MAX_VALUE;            option = conf.getProperty("db-connection.watchdog.output-size-limit");            if(option != null)                maxNodesLimit = ((Integer)option).intValue();        } catch (EXistException e) {            LOG.warn("configure() - Watchdog configuration failed");        }    }