Search in sources :

Example 1 with AroundTimeoutAnnotationParsingProcessor

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

the class TimerServiceAdd method performBoottime.

protected void performBoottime(final OperationContext context, ModelNode operation, final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException {
    final String defaultDataStore = TimerServiceResourceDefinition.DEFAULT_DATA_STORE.resolveModelAttribute(context, model).asString();
    final String threadPoolName = TimerServiceResourceDefinition.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("Configuring timers");
            //we only add the timer service DUP's when the timer service in enabled in XML
            processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_TIMEOUT_ANNOTATION, new TimerServiceAnnotationProcessor());
            processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_AROUNDTIMEOUT_ANNOTATION, new AroundTimeoutAnnotationParsingProcessor());
            processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_EJB_TIMER_METADATA_MERGE, new TimerMethodMergingProcessor());
            processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_EJB_TIMER_SERVICE, new TimerServiceDeploymentProcessor(threadPoolServiceName, defaultDataStore));
        }
    }, OperationContext.Stage.RUNTIME);
    newControllers.add(context.getServiceTarget().addService(TimerServiceDeploymentProcessor.TIMER_SERVICE_NAME, new TimerValueService()).install());
}
Also used : DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) TimerMethodMergingProcessor(org.jboss.as.ejb3.deployment.processors.merging.TimerMethodMergingProcessor) ServiceName(org.jboss.msc.service.ServiceName) AroundTimeoutAnnotationParsingProcessor(org.jboss.as.ejb3.deployment.processors.AroundTimeoutAnnotationParsingProcessor) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep) TimerServiceDeploymentProcessor(org.jboss.as.ejb3.deployment.processors.TimerServiceDeploymentProcessor) TimerServiceAnnotationProcessor(org.jboss.as.ejb3.deployment.processors.annotation.TimerServiceAnnotationProcessor)

Aggregations

AroundTimeoutAnnotationParsingProcessor (org.jboss.as.ejb3.deployment.processors.AroundTimeoutAnnotationParsingProcessor)1 TimerServiceDeploymentProcessor (org.jboss.as.ejb3.deployment.processors.TimerServiceDeploymentProcessor)1 TimerServiceAnnotationProcessor (org.jboss.as.ejb3.deployment.processors.annotation.TimerServiceAnnotationProcessor)1 TimerMethodMergingProcessor (org.jboss.as.ejb3.deployment.processors.merging.TimerMethodMergingProcessor)1 AbstractDeploymentChainStep (org.jboss.as.server.AbstractDeploymentChainStep)1 DeploymentProcessorTarget (org.jboss.as.server.DeploymentProcessorTarget)1 ServiceName (org.jboss.msc.service.ServiceName)1