parser = System.getProperty(Constants.PARSER_PROPERTY, Constants.DEFAULT_PARSER);
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("Using parser: " + parser);
}
ExcaliburComponentManager startupManager = new ExcaliburComponentManager((ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
startupManager.setLogger(getLogger().getChildLogger("startup"));
startupManager.contextualize(this.context);
startupManager.setLogKitManager(this.logKitManager);
try {
startupManager.addComponent(Parser.ROLE, ClassUtils.loadClass(parser), new org.apache.avalon.framework.configuration.DefaultConfiguration("", "empty"));
} catch (Exception e) {
getLogger().error("Could not load parser, Cocoon object not created.", e);
throw new ConfigurationException("Could not load parser " + parser, e);
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("Classpath = " + classpath);
getLogger().debug("Work directory = " + workDir.getCanonicalPath());
}
startupManager.initialize();
this.configure(startupManager);
startupManager.dispose();
startupManager = null;
this.componentManager.initialize();
// Get the Processor and keep it if it's ThreadSafe