Search in sources :

Example 26 with DeploymentProcessorTarget

use of org.jboss.as.server.DeploymentProcessorTarget in project wildfly by wildfly.

the class EJB3AsyncServiceAdd method performBoottime.

@Override
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException {
    final String threadPoolName = EJB3AsyncResourceDefinition.THREAD_POOL_NAME.resolveModelAttribute(context, model).asString();
    final ServiceName threadPoolServiceName = context.getCapabilityServiceName(EJB3AsyncResourceDefinition.THREAD_POOL_CAPABILITY_NAME, threadPoolName, Executor.class);
    context.addStep(new AbstractDeploymentChainStep() {

        protected void execute(DeploymentProcessorTarget processorTarget) {
            ROOT_LOGGER.debug("Adding Jakarta Enterprise Beans @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)

Example 27 with DeploymentProcessorTarget

use of org.jboss.as.server.DeploymentProcessorTarget in project wildfly by wildfly.

the class EJB3IIOPAdd method performBoottime.

@Override
protected void performBoottime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException {
    final boolean enableByDefault = EJB3IIOPResourceDefinition.ENABLE_BY_DEFAULT.resolveModelAttribute(context, model).asBoolean();
    final boolean useQualifiedName = EJB3IIOPResourceDefinition.USE_QUALIFIED_NAME.resolveModelAttribute(context, model).asBoolean();
    final IIOPSettingsService settingsService = new IIOPSettingsService(enableByDefault, useQualifiedName);
    context.addStep(new AbstractDeploymentChainStep() {

        protected void execute(DeploymentProcessorTarget processorTarget) {
            ROOT_LOGGER.debug("Adding Jakarta Enterprise Beans IIOP support");
            processorTarget.addDeploymentProcessor(EJB3Extension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_EJB_IIOP, new EjbIIOPDeploymentUnitProcessor(settingsService));
        }
    }, OperationContext.Stage.RUNTIME);
    context.getCapabilityServiceTarget().addCapability(EJB3IIOPResourceDefinition.EJB3_IIOP_SETTINGS_CAPABILITY, settingsService).install();
}
Also used : DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep) EjbIIOPDeploymentUnitProcessor(org.jboss.as.ejb3.deployment.processors.EjbIIOPDeploymentUnitProcessor)

Example 28 with DeploymentProcessorTarget

use of org.jboss.as.server.DeploymentProcessorTarget in project wildfly by wildfly.

the class ElytronOidcSubsystemAdd method performBoottime.

@Override
public void performBoottime(OperationContext context, ModelNode operation, ModelNode model) {
    ROOT_LOGGER.activatingSubsystem();
    OidcConfigService.getInstance().clear();
    if (context.isNormalServer()) {
        context.addStep(new AbstractDeploymentChainStep() {

            @Override
            protected void execute(DeploymentProcessorTarget processorTarget) {
                processorTarget.addDeploymentProcessor(ElytronOidcExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_OIDC_DETECTION, new OidcActivationProcessor());
                processorTarget.addDeploymentProcessor(ElytronOidcExtension.SUBSYSTEM_NAME, Phase.PARSE, PARSE_DEFINE_VIRTUAL_HTTP_SERVER_MECHANISM_FACTORY_NAME, new VirtualHttpServerMechanismFactoryNameProcessor());
                processorTarget.addDeploymentProcessor(ElytronOidcExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, DEPENDENCIES_OIDC, new OidcDependencyProcessor());
                processorTarget.addDeploymentProcessor(ElytronOidcExtension.SUBSYSTEM_NAME, Phase.INSTALL, INSTALL_VIRTUAL_HTTP_SERVER_MECHANISM_FACTORY, new VirtualHttpServerMechanismFactoryProcessor());
            }
        }, OperationContext.Stage.RUNTIME);
    }
}
Also used : DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep)

Example 29 with DeploymentProcessorTarget

use of org.jboss.as.server.DeploymentProcessorTarget in project wildfly by wildfly.

the class JaxrsSubsystemAdd method performBoottime.

protected void performBoottime(final OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
    final ServiceTarget serviceTarget = context.getServiceTarget();
    JaxrsLogger.JAXRS_LOGGER.resteasyVersion(ResteasyDeployment.class.getPackage().getImplementationVersion());
    context.addStep(new AbstractDeploymentChainStep() {

        public void execute(DeploymentProcessorTarget processorTarget) {
            processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JAXRS_ANNOTATIONS, new JaxrsAnnotationProcessor());
            processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_JAXRS_SPRING, new JaxrsSpringProcessor(serviceTarget));
            processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_JAXRS, new JaxrsDependencyProcessor());
            processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JAXRS_SCANNING, new JaxrsScanningProcessor());
            processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JAXRS_COMPONENT, new JaxrsComponentDeployer());
            CapabilityServiceSupport capabilities = context.getCapabilityServiceSupport();
            if (capabilities.hasCapability(WELD_CAPABILITY_NAME)) {
                processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JAXRS_CDI_INTEGRATION, new JaxrsCdiIntegrationProcessor());
            }
            processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JAXRS_METHOD_PARAMETER, new JaxrsMethodParameterProcessor());
            processorTarget.addDeploymentProcessor(JaxrsExtension.SUBSYSTEM_NAME, Phase.INSTALL, Phase.INSTALL_JAXRS_DEPLOYMENT, new JaxrsIntegrationProcessor());
        }
    }, OperationContext.Stage.RUNTIME);
    JaxrsServerConfig serverConfig = createServerConfig(operation, context);
    JaxrsServerConfigService.install(serviceTarget, serverConfig);
}
Also used : JaxrsIntegrationProcessor(org.jboss.as.jaxrs.deployment.JaxrsIntegrationProcessor) JaxrsAnnotationProcessor(org.jboss.as.jaxrs.deployment.JaxrsAnnotationProcessor) JaxrsScanningProcessor(org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor) ServiceTarget(org.jboss.msc.service.ServiceTarget) JaxrsSpringProcessor(org.jboss.as.jaxrs.deployment.JaxrsSpringProcessor) JaxrsComponentDeployer(org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer) CapabilityServiceSupport(org.jboss.as.controller.capability.CapabilityServiceSupport) JaxrsDependencyProcessor(org.jboss.as.jaxrs.deployment.JaxrsDependencyProcessor) DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) JaxrsCdiIntegrationProcessor(org.jboss.as.jaxrs.deployment.JaxrsCdiIntegrationProcessor) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep) JaxrsMethodParameterProcessor(org.jboss.as.jaxrs.deployment.JaxrsMethodParameterProcessor)

Example 30 with DeploymentProcessorTarget

use of org.jboss.as.server.DeploymentProcessorTarget in project wildfly by wildfly.

the class JSFSubsystemAdd method performBoottime.

@Override
protected void performBoottime(OperationContext context, ModelNode operation, final ModelNode model) throws OperationFailedException {
    final String defaultJSFSlot = JSFResourceDefinition.DEFAULT_JSF_IMPL_SLOT.resolveModelAttribute(context, model).asString();
    final Boolean disallowDoctypeDecl = JSFResourceDefinition.DISALLOW_DOCTYPE_DECL.resolveModelAttribute(context, model).asBooleanOrNull();
    context.addStep(new AbstractDeploymentChainStep() {

        protected void execute(DeploymentProcessorTarget processorTarget) {
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_VERSION, new JSFVersionProcessor(defaultJSFSlot));
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_SHARED_TLDS, new JSFSharedTldsProcessor());
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_JSF_METADATA, new JSFMetadataProcessor(disallowDoctypeDecl));
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_JSF, new JSFDependencyProcessor());
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JSF_MANAGED_BEANS, new JSFComponentProcessor());
            CapabilityServiceSupport capabilities = context.getCapabilityServiceSupport();
            if (capabilities.hasCapability(WELD_CAPABILITY_NAME)) {
                processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_JSF_CDI_EXTENSIONS, new JSFCdiExtensionDeploymentProcessor());
            }
            processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.INSTALL, Phase.INSTALL_JSF_ANNOTATIONS, new JSFAnnotationProcessor());
            if (context.hasOptionalCapability("org.wildfly.bean-validation", null, null)) {
                processorTarget.addDeploymentProcessor(JSFExtension.SUBSYSTEM_NAME, Phase.INSTALL, Phase.INSTALL_JSF_VALIDATOR_FACTORY, new JSFBeanValidationFactoryProcessor());
            }
        }
    }, OperationContext.Stage.RUNTIME);
}
Also used : JSFVersionProcessor(org.jboss.as.jsf.deployment.JSFVersionProcessor) JSFMetadataProcessor(org.jboss.as.jsf.deployment.JSFMetadataProcessor) JSFCdiExtensionDeploymentProcessor(org.jboss.as.jsf.deployment.JSFCdiExtensionDeploymentProcessor) CapabilityServiceSupport(org.jboss.as.controller.capability.CapabilityServiceSupport) JSFAnnotationProcessor(org.jboss.as.jsf.deployment.JSFAnnotationProcessor) JSFBeanValidationFactoryProcessor(org.jboss.as.jsf.deployment.JSFBeanValidationFactoryProcessor) JSFDependencyProcessor(org.jboss.as.jsf.deployment.JSFDependencyProcessor) JSFComponentProcessor(org.jboss.as.jsf.deployment.JSFComponentProcessor) DeploymentProcessorTarget(org.jboss.as.server.DeploymentProcessorTarget) JSFSharedTldsProcessor(org.jboss.as.jsf.deployment.JSFSharedTldsProcessor) AbstractDeploymentChainStep(org.jboss.as.server.AbstractDeploymentChainStep)

Aggregations

AbstractDeploymentChainStep (org.jboss.as.server.AbstractDeploymentChainStep)39 DeploymentProcessorTarget (org.jboss.as.server.DeploymentProcessorTarget)39 ServiceTarget (org.jboss.msc.service.ServiceTarget)12 ModelNode (org.jboss.dmr.ModelNode)11 ServiceName (org.jboss.msc.service.ServiceName)10 JBossAllXmlParserRegisteringProcessor (org.jboss.as.server.deployment.jbossallxml.JBossAllXmlParserRegisteringProcessor)7 CapabilityServiceSupport (org.jboss.as.controller.capability.CapabilityServiceSupport)6 OperationContext (org.jboss.as.controller.OperationContext)5 OperationFailedException (org.jboss.as.controller.OperationFailedException)4 OperationStepHandler (org.jboss.as.controller.OperationStepHandler)4 PathHandler (io.undertow.server.handlers.PathHandler)3 Resource (org.jboss.as.controller.registry.Resource)3 AssociationService (org.jboss.as.ejb3.remote.AssociationService)3 BinderService (org.jboss.as.naming.service.BinderService)3 UserTransactionAccessControlService (org.jboss.as.txn.service.UserTransactionAccessControlService)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Properties (java.util.Properties)2 TransactionManager (javax.transaction.TransactionManager)2 TransactionSynchronizationRegistry (javax.transaction.TransactionSynchronizationRegistry)2