Source:
public void start() throws EmbeddedProcessStartException { ClassLoader tccl = EmbeddedManagedProcess.getTccl(); try { EmbeddedManagedProcess.setTccl(embeddedModuleCL); Bootstrap bootstrap = null; try { final long startTime = System.currentTimeMillis(); SystemExiter.initialize(new SystemExiter.Exiter() { @Override public void exit(int status) { StandaloneServerImpl.this.exit(); } }); ServerEnvironmentWrapper wrapper = Main.determineEnvironment(cmdargs, systemProps, systemEnv, ServerEnvironment.LaunchType.EMBEDDED, startTime); ServerEnvironment serverEnvironment = wrapper.getServerEnvironment(); if (serverEnvironment == null && ServerEnvironmentWrapper.ServerEnvironmentStatus.NORMAL.equals(wrapper.getServerEnvironmentStatus())) { return; } bootstrap = Bootstrap.Factory.newInstance(); Bootstrap.Configuration configuration = new Bootstrap.Configuration(serverEnvironment); configuration.setModuleLoader(moduleLoader); Future<ServiceContainer> future = bootstrap.startup(configuration, Collections.<ServiceActivator>emptyList()); serviceContainer = future.get(); executorService = Executors.newCachedThreadPool(); @SuppressWarnings({"unchecked", "deprecation"}) final Value<ProcessStateNotifier> processStateNotifierValue = (Value<ProcessStateNotifier>) serviceContainer.getRequiredService(ControlledProcessStateService.SERVICE_NAME); processStateNotifier = processStateNotifierValue.getValue(); processStateNotifier.addPropertyChangeListener(processStateListener); establishModelControllerClient(processStateNotifier.getCurrentState(), true); } catch (RuntimeException rte) { if (bootstrap != null) { bootstrap.failed(); } throw rte; } catch (Exception ex) { if (bootstrap != null) { bootstrap.failed(); } throw EmbeddedLogger.ROOT_LOGGER.cannotStartEmbeddedServer(ex); } } finally { EmbeddedManagedProcess.setTccl(tccl); } }

Target:
public void start() throws EmbeddedProcessStartException { ClassLoader tccl = EmbeddedManagedProcess.getTccl(); try { EmbeddedManagedProcess.setTccl(embeddedModuleCL); Bootstrap bootstrap = null; try { final long startTime = System.currentTimeMillis(); SystemExiter.initialize(new SystemExiter.Exiter() { @Override public void exit(int status) { StandaloneServerImpl.this.exit(); } }); ServerEnvironment serverEnvironment = Main.determineEnvironment(cmdargs, systemProps, systemEnv, ServerEnvironment.LaunchType.EMBEDDED, startTime).getServerEnvironment(); if (serverEnvironment == null) { return; } bootstrap = Bootstrap.Factory.newInstance(); Bootstrap.Configuration configuration = new Bootstrap.Configuration(serverEnvironment); configuration.setModuleLoader(moduleLoader); Future<ServiceContainer> future = bootstrap.startup(configuration, Collections.<ServiceActivator>emptyList()); serviceContainer = future.get(); executorService = Executors.newCachedThreadPool(); @SuppressWarnings({"unchecked", "deprecation"}) final Value<ProcessStateNotifier> processStateNotifierValue = (Value<ProcessStateNotifier>) serviceContainer.getRequiredService(ControlledProcessStateService.SERVICE_NAME); processStateNotifier = processStateNotifierValue.getValue(); processStateNotifier.addPropertyChangeListener(processStateListener); establishModelControllerClient(processStateNotifier.getCurrentState(), true); } catch (RuntimeException rte) { if (bootstrap != null) { bootstrap.failed(); } throw rte; } catch (Exception ex) { if (bootstrap != null) { bootstrap.failed(); } throw EmbeddedLogger.ROOT_LOGGER.cannotStartEmbeddedServer(ex); } } finally { EmbeddedManagedProcess.setTccl(tccl); } }