Search in sources :

Example 1 with RuntimeContainerJobExecutor

use of org.camunda.bpm.engine.impl.jobexecutor.RuntimeContainerJobExecutor in project camunda-bpm-platform by camunda.

the class JobAcquisitionAdd method performRuntime.

@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
    String acquisitionName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.ADDRESS)).getLastElement().getValue();
    MscRuntimeContainerJobExecutor mscRuntimeContainerJobExecutor = new MscRuntimeContainerJobExecutor();
    if (model.hasDefined(SubsystemAttributeDefinitons.PROPERTIES.getName())) {
        List<Property> properties = SubsystemAttributeDefinitons.PROPERTIES.resolveModelAttribute(context, model).asPropertyList();
        for (Property property : properties) {
            PropertyHelper.applyProperty(mscRuntimeContainerJobExecutor, property.getName(), property.getValue().asString());
        }
    }
    // start new service for job executor
    ServiceController<RuntimeContainerJobExecutor> serviceController = context.getServiceTarget().addService(ServiceNames.forMscRuntimeContainerJobExecutorService(acquisitionName), mscRuntimeContainerJobExecutor).addDependency(ServiceNames.forMscRuntimeContainerDelegate()).addDependency(ServiceNames.forMscExecutorService()).addListener(verificationHandler).setInitialMode(Mode.ACTIVE).install();
    newControllers.add(serviceController);
}
Also used : MscRuntimeContainerJobExecutor(org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerJobExecutor) Property(org.jboss.dmr.Property) MscRuntimeContainerJobExecutor(org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerJobExecutor) RuntimeContainerJobExecutor(org.camunda.bpm.engine.impl.jobexecutor.RuntimeContainerJobExecutor)

Aggregations

MscRuntimeContainerJobExecutor (org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerJobExecutor)1 RuntimeContainerJobExecutor (org.camunda.bpm.engine.impl.jobexecutor.RuntimeContainerJobExecutor)1 Property (org.jboss.dmr.Property)1