if (active) {
// use a custom class loader to load the file, in case we are using classes from another jar.
Class c = customClassLoader.loadClass(clazz);
if (Module.class.isAssignableFrom(c)) {
module = (Module)c.newInstance();
module.initialize(new XMLSettings(settings.getNode("/modules/module[" + i + "]/settings")));
module.registerActions(siteCommandHandler);
module.registerEventHandlers(eventHandler);
modules.put(moduleName, module);
} else {
throw new ConfigurationException("Class " + clazz + " does not implement interface " + Module.class.toString());