Search in sources :

Example 1 with AsynchronousMergingProcessor

use of org.jboss.as.ejb3.deployment.processors.merging.AsynchronousMergingProcessor in project wildfly by wildfly.

the class EJB3AsyncServiceAdd method performBoottime.

@Override
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
    final String threadPoolName = EJB3AsyncResourceDefinition.THREAD_POOL_NAME.resolveModelAttribute(context, model).asString();
    final ServiceName threadPoolServiceName = EJB3SubsystemModel.BASE_THREAD_POOL_SERVICE_NAME.append(threadPoolName);
    context.addStep(new AbstractDeploymentChainStep() {

        protected void execute(DeploymentProcessorTarget processorTarget) {
            ROOT_LOGGER.debug("Adding EJB @Asynchronous support");
            processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_EJB_ASYNCHRONOUS_MERGE, new AsynchronousMergingProcessor(threadPoolServiceName));
        }
    }, OperationContext.Stage.RUNTIME);
}
Also used : DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) ServiceName(org.jboss.msc.service.ServiceName) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep) AsynchronousMergingProcessor(org.jboss.as.ejb3.deployment.processors.merging.AsynchronousMergingProcessor)

Aggregations

AsynchronousMergingProcessor (org.jboss.as.ejb3.deployment.processors.merging.AsynchronousMergingProcessor)1 AbstractDeploymentChainStep (org.jboss.as.server.AbstractDeploymentChainStep)1 DeploymentProcessorTarget (org.jboss.as.server.DeploymentProcessorTarget)1 ServiceName (org.jboss.msc.service.ServiceName)1