Collection plugins = conf.getConfiguration().getComponentLifecyclePlugins();
Iterator i = plugins.iterator();
ClassLoader loader = Thread.currentThread().getContextClassLoader();
while (i.hasNext())
{
ComponentLifecyclePlugin plugin = (ComponentLifecyclePlugin)i.next();
try
{
Class classType = loader.loadClass(plugin.getType());
org.exoplatform.container.component.ComponentLifecyclePlugin instance =
(org.exoplatform.container.component.ComponentLifecyclePlugin)classType.newInstance();
container.addComponentLifecylePlugin(instance);
}
catch (Exception ex)
{
log.error("Failed to instanciate plugin " + plugin.getType() + ": " + ex.getMessage(), ex);
}
}
}