Search in sources :

Example 1 with WSComponentDescription

use of org.jboss.as.webservices.injection.WSComponentDescription in project wildfly by wildfly.

the class AbstractIntegrationProcessorJAXWS method createComponentDescription.

static ComponentDescription createComponentDescription(final DeploymentUnit unit, final String componentName, final String componentClassName, final String dependsOnEndpointClassName) {
    final EEModuleDescription moduleDescription = getRequiredAttachment(unit, EE_MODULE_DESCRIPTION);
    // JBoss WEB processors may install fake components for WS endpoints - removing them forcibly
    moduleDescription.removeComponent(componentName, componentClassName);
    // register WS component
    ComponentDescription componentDescription = new WSComponentDescription(componentName, componentClassName, moduleDescription, unit.getServiceName());
    moduleDescription.addComponent(componentDescription);
    // register WS dependency
    final ServiceName endpointServiceName = EndpointService.getServiceName(unit, dependsOnEndpointClassName);
    componentDescription.addDependency(endpointServiceName, ServiceBuilder.DependencyType.REQUIRED);
    return componentDescription;
}
Also used : WSComponentDescription(org.jboss.as.webservices.injection.WSComponentDescription) ComponentDescription(org.jboss.as.ee.component.ComponentDescription) EEModuleDescription(org.jboss.as.ee.component.EEModuleDescription) ServiceName(org.jboss.msc.service.ServiceName) WSComponentDescription(org.jboss.as.webservices.injection.WSComponentDescription)

Example 2 with WSComponentDescription

use of org.jboss.as.webservices.injection.WSComponentDescription in project wildfly by wildfly.

the class XTSInterceptorDeploymentProcessor method deploy.

public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit unit = phaseContext.getDeploymentUnit();
    final EEModuleDescription moduleDescription = unit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
    for (ComponentDescription component : moduleDescription.getComponentDescriptions()) {
        if (component instanceof SessionBeanComponentDescription) {
            registerSessionBeanInterceptors((SessionBeanComponentDescription) component);
        }
        if (component instanceof WSComponentDescription) {
            registerWSPOJOInterceptors((WSComponentDescription) component);
        }
    }
}
Also used : ComponentDescription(org.jboss.as.ee.component.ComponentDescription) WSComponentDescription(org.jboss.as.webservices.injection.WSComponentDescription) SessionBeanComponentDescription(org.jboss.as.ejb3.component.session.SessionBeanComponentDescription) EEModuleDescription(org.jboss.as.ee.component.EEModuleDescription) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit) SessionBeanComponentDescription(org.jboss.as.ejb3.component.session.SessionBeanComponentDescription) WSComponentDescription(org.jboss.as.webservices.injection.WSComponentDescription)

Aggregations

ComponentDescription (org.jboss.as.ee.component.ComponentDescription)2 EEModuleDescription (org.jboss.as.ee.component.EEModuleDescription)2 WSComponentDescription (org.jboss.as.webservices.injection.WSComponentDescription)2 SessionBeanComponentDescription (org.jboss.as.ejb3.component.session.SessionBeanComponentDescription)1 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)1 ServiceName (org.jboss.msc.service.ServiceName)1