private void initListeners(com.actimind.diagnostic.xml.Monitor m, List<SingleStatProcessor> processors, StatDB db) throws Exception, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        ListenersFactory lf = new ListenersFactory();
        List<StatProcessorListener> listeners = new ArrayList<StatProcessorListener>();
        listeners.add(new DBSaver(db));
        listeners.add(new ErrorLogger());
        lf.fillListeners(m, listeners, new SingleStatProcessorFactory().obtainGlobalParams(m));
        for (SingleStatProcessor p: processors) {
            for (StatProcessorListener listener: listeners) {
                p.addListener(listener);
            }
        }
    }