final ServiceContainer container = context.getController().getServiceContainer();
final ServiceTarget serviceTarget = context.getChildTarget();
final Bootstrap.Configuration configuration = this.configuration;
final ServerEnvironment serverEnvironment = configuration.getServerEnvironment();
final ExtensibleConfigurationPersister persister = configuration.getConfigurationPersister();
// TODO consider injecting the executor service
final ThreadGroup threadGroup = new ThreadGroup("ServerController-threads");
final ThreadFactory threadFactory = new JBossThreadFactory(threadGroup, Boolean.FALSE, null, "%G - %t", null, null, AccessController.getContext());
final ExecutorService executorService = Executors.newScheduledThreadPool(DEFAULT_POOL_SIZE, threadFactory);
final ServerControllerImpl serverController = new ServerControllerImpl(container, serviceTarget, serverEnvironment, persister, injectedDeploymentRepository.getValue(), executorService);
serverController.init();
serviceTarget.addListener(serverController.getServerStateMonitorListener());
final List<ModelNode> updates;
try {
updates = persister.load();
} catch (Exception e) {
throw new StartException(e);
}
log.info("Activating core services");