/** * Bootstraps the application to a minimum runnable form. * * @param configPath * - the configuration file path to use * @param fragments - additional {@link BootstrapFragment} instances to use during initialization */ public void bootstrap(String configPath, BootstrapFragment...fragments) throws Exception { if (!isRunning()) { LOG.info("Bootstrapping Snow Owl..."); this.bootstrap = new Bootstrap(fragments); this.configuration = createConfiguration(bootstrap, configPath); this.environment = new Environment(bootstrap, configuration); logEnvironment(); this.bootstrap.init(this.configuration, this.environment); // after init checks try { this.environment.service(IUserManager.class); } catch (Exception e) { throw new InitializationException("UserManager should be registered after the bootstrap process."); } } }