SecurityActions.getSystemEnvironment(), null, null, ServerEnvironment.LaunchType.DOMAIN, RunningMode.NORMAL, productConfig);
// TODO perhaps have ConfigurationPersisterFactory as a Service
final List<ServiceActivator> services = new ArrayList<ServiceActivator>(startServices);
final ServerBootOperationsService service = new ServerBootOperationsService();
// ModelController.boot() will block on this future in order to get the boot updates.
final Future<ModelNode> bootOperations = service.getFutureResult();
final ServiceActivator activator = new ServiceActivator() {
@Override
public void activate(ServiceActivatorContext serviceActivatorContext) throws ServiceRegistryException {
final ServiceTarget target = serviceActivatorContext.getServiceTarget();
target.addService(ServiceName.JBOSS.append("server-boot-operations"), service)
.addDependency(Services.JBOSS_AS)
.addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.getServerController())
.addDependency(HostControllerConnectionService.SERVICE_NAME, HostControllerClient.class, service.getClientInjector())
.addDependency(Services.JBOSS_SERVER_EXECUTOR, Executor.class, service.getExecutorInjector())
.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
}
};
services.add(activator);