processManagerClient.requestProcessInventory();
}
private void activateLocalDomainController(final ServiceActivatorContext serviceActivatorContext) {
try {
final BatchBuilder batchBuilder = serviceActivatorContext.getBatchBuilder();
final XMLMapper mapper = XMLMapper.Factory.create();
extensionRegistrar.registerStandardDomainReaders(mapper);
final DomainController domainController = new DomainController();
batchBuilder.addService(DomainController.SERVICE_NAME, domainController)
.addInjection(domainController.getXmlMapperInjector(), mapper)
.addInjection(domainController.getDomainConfigDirInjector(), environment.getDomainConfigurationDir())
.addInjection(domainController.getDomainDeploymentsDirInjector(), environment.getDomainDeploymentDir())
.addDependency(SERVICE_NAME_BASE.append("executor"), ScheduledExecutorService.class, domainController.getScheduledExecutorServiceInjector());
final DomainControllerOperationHandler domainControllerOperationHandler = new DomainControllerOperationHandler();
batchBuilder.addService(DomainControllerOperationHandler.SERVICE_NAME, domainControllerOperationHandler)
.addDependency(DomainController.SERVICE_NAME, DomainController.class, domainControllerOperationHandler.getDomainControllerInjector())
.addDependency(SERVICE_NAME_BASE.append("executor"), ScheduledExecutorService.class, domainControllerOperationHandler.getExecutorServiceInjector())
.addDependency(SERVICE_NAME_BASE.append("thread-factory"), ThreadFactory.class, domainControllerOperationHandler.getThreadFactoryInjector())
.addInjection(domainControllerOperationHandler.getLocalFileRepositoryInjector(), fileRepository)
.addDependency(ManagementCommunicationService.SERVICE_NAME, ManagementCommunicationService.class, new ManagementCommunicationServiceInjector(domainControllerOperationHandler));
final DomainControllerClientOperationHandler domainControllerClientOperationHandler = new DomainControllerClientOperationHandler();
batchBuilder.addService(DomainControllerClientOperationHandler.SERVICE_NAME, domainControllerClientOperationHandler)
.addDependency(DomainController.SERVICE_NAME, DomainController.class, domainControllerClientOperationHandler.getDomainControllerInjector())
.addDependency(ManagementCommunicationService.SERVICE_NAME, ManagementCommunicationService.class, new ManagementCommunicationServiceInjector(domainControllerClientOperationHandler));
batchBuilder.addService(DomainControllerConnection.SERVICE_NAME, new LocalDomainControllerConnection(ServerManager.this, domainController, fileRepository))
.addDependency(DomainController.SERVICE_NAME);
} catch (Exception e) {
throw new RuntimeException("Exception starting local domain controller", e);
}