pluginManager.startup();
// PLUGINS CONFIGURED IN XML
if (configuration.handlers != null) {
// ACTIVATE PLUGINS
OServerPlugin handler;
for (OServerHandlerConfiguration h : configuration.handlers) {
if (h.parameters != null) {
// CHECK IF IT'S ENABLED
boolean enabled = true;
for (OServerParameterConfiguration p : h.parameters) {
if (p.name.equals("enabled")) {
enabled = false;
String value = OSystemVariableResolver.resolveSystemVariables(p.value);
if (value != null) {
value = value.trim();
if ("true".equalsIgnoreCase(value)) {
enabled = true;
break;
}
}
}
}
if (!enabled)
// SKIP IT
continue;
}
handler = (OServerPlugin) Class.forName(h.clazz).newInstance();
if (handler instanceof ODistributedServerManager)
distributedManager = (ODistributedServerManager) handler;
pluginManager.registerPlugin(new OServerPluginInfo(handler.getName(), null, null, null, handler, null, 0, null));
handler.config(this, h.parameters);
handler.startup();
}
}
}