LibraryLoader libLoader = new LibraryLoader();
libLoader.setPath(rootDirectory.lookup("lib"));
libLoader.init();
Config config = new Config();
BootResinConfig bootManager = new BootResinConfig(system, _args);
ResinELContext elContext = _args.getELContext();
/**
* XXX: the following setVar calls should not be necessary, but the
* EL.setEnviornment() call above is not effective:
*/
InjectManager beanManager = InjectManager.create();
Config.setProperty("resinHome", elContext.getResinHome());
Config.setProperty("java", elContext.getJavaVar());
Config.setProperty("resin", elContext.getResinVar());
Config.setProperty("server", elContext.getServerVar());
Config.setProperty("system", System.getProperties());
Config.setProperty("getenv", System.getenv());
ResinConfigLibrary.configure(beanManager);
config.configure(bootManager, _args.getResinConf(),
"com/caucho/server/resin/resin.rnc");
if (_args.isDynamicServer()) {
_client = bootManager.addDynamicClient(_args);
}