}
} catch (final Throwable e) {
// no-op
}
final TomcatLoader loader = new TomcatLoader();
loader.initDefaults(properties);
// need to add properties after having initialized defaults
// to properties passed to SystemInstance otherwise we loose some of them
final Properties initProps = new Properties();
initProps.putAll(System.getProperties());
initProps.putAll(properties);
SystemInstance.init(initProps);
SystemInstance.get().setComponent(StandardServer.class, (StandardServer) tomcat.getServer());
SystemInstance.get().setComponent(Server.class, tomcat.getServer()); // needed again cause of init()
loader.initialize(properties);
assembler = SystemInstance.get().getComponent(Assembler.class);
configurationFactory = new ConfigurationFactory();
}