Search in sources :

Example 1 with MscRuntimeContainerDelegate

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);
}
Also used : MscBpmPlatformPlugins(org.camunda.bpm.container.impl.jboss.service.MscBpmPlatformPlugins) BpmPlatformPlugins(org.camunda.bpm.container.impl.plugin.BpmPlatformPlugins) MscBpmPlatformPlugins(org.camunda.bpm.container.impl.jboss.service.MscBpmPlatformPlugins) DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep) MscRuntimeContainerDelegate(org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerDelegate)

Aggregations

MscBpmPlatformPlugins (org.camunda.bpm.container.impl.jboss.service.MscBpmPlatformPlugins)1 MscRuntimeContainerDelegate (org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerDelegate)1 BpmPlatformPlugins (org.camunda.bpm.container.impl.plugin.BpmPlatformPlugins)1 AbstractDeploymentChainStep (org.jboss.as.server.AbstractDeploymentChainStep)1 DeploymentProcessorTarget (org.jboss.as.server.DeploymentProcessorTarget)1