use of org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerDelegate in project camunda-bpm-platform by camunda.
the class BpmPlatformSubsystemAdd method performBoottime.
/**
* {@inheritDoc}
*/
@Override
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
// add deployment processors
context.addStep(new AbstractDeploymentChainStep() {
public void execute(DeploymentProcessorTarget processorTarget) {
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.PARSE, ProcessApplicationProcessor.PRIORITY, new ProcessApplicationProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.DEPENDENCIES, ModuleDependencyProcessor.PRIORITY, new ModuleDependencyProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.POST_MODULE, ProcessesXmlProcessor.PRIORITY, new ProcessesXmlProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.INSTALL, ProcessEngineStartProcessor.PRIORITY, new ProcessEngineStartProcessor());
processorTarget.addDeploymentProcessor(ModelConstants.SUBSYSTEM_NAME, Phase.INSTALL, ProcessApplicationDeploymentProcessor.PRIORITY, new ProcessApplicationDeploymentProcessor());
}
}, OperationContext.Stage.RUNTIME);
// create and register the MSC container delegate.
final MscRuntimeContainerDelegate processEngineService = new MscRuntimeContainerDelegate();
final ServiceController<MscRuntimeContainerDelegate> controller = context.getServiceTarget().addService(ServiceNames.forMscRuntimeContainerDelegate(), processEngineService).addListener(verificationHandler).setInitialMode(Mode.ACTIVE).install();
newControllers.add(controller);
// discover and register bpm platform plugins
BpmPlatformPlugins plugins = BpmPlatformPlugins.load(getClass().getClassLoader());
MscBpmPlatformPlugins managedPlugins = new MscBpmPlatformPlugins(plugins);
ServiceController<BpmPlatformPlugins> serviceController = context.getServiceTarget().addService(ServiceNames.forBpmPlatformPlugins(), managedPlugins).addListener(verificationHandler).setInitialMode(Mode.ACTIVE).install();
newControllers.add(serviceController);
}
Aggregations