Search in sources :

Example 11 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class DeploymentModelBuilderJAXWS_EJB method build.

@Override
protected void build(final Deployment dep, final DeploymentUnit unit) {
    WSLogger.ROOT_LOGGER.trace("Creating JAXWS EJB endpoints meta data model");
    WSEndpointConfigMapping ecm = unit.getAttachment(WSAttachmentKeys.WS_ENDPOINT_CONFIG_MAPPING_KEY);
    for (final EJBEndpoint ejbEndpoint : getJaxwsEjbs(unit)) {
        final String ejbEndpointName = ejbEndpoint.getName();
        WSLogger.ROOT_LOGGER.tracef("EJB name: %s", ejbEndpointName);
        final String ejbEndpointClassName = ejbEndpoint.getClassName();
        WSLogger.ROOT_LOGGER.tracef("EJB class: %s", ejbEndpointClassName);
        final Endpoint ep = newHttpEndpoint(ejbEndpointClassName, ejbEndpointName, dep);
        final ServiceName componentViewName = ejbEndpoint.getComponentViewName();
        if (componentViewName != null) {
            ep.setProperty(COMPONENT_VIEW_NAME, componentViewName);
        }
        ep.setEndpointConfig(ecm.getConfig(ejbEndpointClassName));
    }
}
Also used : Endpoint(org.jboss.wsf.spi.deployment.Endpoint) EJBEndpoint(org.jboss.as.webservices.metadata.model.EJBEndpoint) ServiceName(org.jboss.msc.service.ServiceName) EJBEndpoint(org.jboss.as.webservices.metadata.model.EJBEndpoint) WSEndpointConfigMapping(org.jboss.as.webservices.deployers.WSEndpointConfigMapping)

Example 12 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class EndpointRecordProcessorDeploymentAspect method start.

@Override
public void start(final Deployment dep) {
    final int size = processors.size();
    for (final Endpoint ep : dep.getService().getEndpoints()) {
        List<RecordProcessor> processorList = new Vector<RecordProcessor>(size);
        for (RecordProcessor pr : processors) {
            try {
                RecordProcessor clone = (RecordProcessor) pr.clone();
                processorList.add(clone);
            } catch (final CloneNotSupportedException ex) {
                throw new RuntimeException(ex);
            }
        }
        ep.setRecordProcessors(processorList);
    }
}
Also used : Endpoint(org.jboss.wsf.spi.deployment.Endpoint) RecordProcessor(org.jboss.ws.api.monitoring.RecordProcessor) Vector(java.util.Vector) Endpoint(org.jboss.wsf.spi.deployment.Endpoint)

Example 13 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class EndpointServiceDeploymentAspect method start.

@Override
public void start(final Deployment dep) {
    final ServiceTarget target = getOptionalAttachment(dep, ServiceTarget.class);
    final DeploymentUnit unit = getRequiredAttachment(dep, DeploymentUnit.class);
    for (final Endpoint ep : dep.getService().getEndpoints()) {
        EndpointService.install(target, ep, unit);
    }
}
Also used : Endpoint(org.jboss.wsf.spi.deployment.Endpoint) ServiceTarget(org.jboss.msc.service.ServiceTarget) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit)

Example 14 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class EndpointService method install.

public static void install(final ServiceTarget serviceTarget, final Endpoint endpoint, final DeploymentUnit unit) {
    final ServiceName serviceName = getServiceName(unit, endpoint.getShortName());
    final String propContext = endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
    final String propEndpoint = endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
    final StringBuilder context = new StringBuilder(Endpoint.SEPID_PROPERTY_CONTEXT).append("=").append(propContext);
    final EndpointService service = new EndpointService(endpoint, serviceName);
    final ServiceBuilder<Endpoint> builder = serviceTarget.addService(serviceName, service);
    final ServiceName alias = WSServices.ENDPOINT_SERVICE.append(context.toString()).append(propEndpoint);
    builder.addAliases(alias);
    final String domainName = getDeploymentSecurityDomainName(endpoint);
    if (isElytronSecurityDomain(endpoint, domainName)) {
        if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
            ServiceName ejbSecurityDomainServiceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY.getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class);
            builder.addDependency(ejbSecurityDomainServiceName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class, service.getEjbApplicationSeruityDomainInjector());
        } else {
            ServiceName elytronDomainName = ELYTRON_DOMAIN_CAPABILITY.getCapabilityServiceName(domainName, SecurityDomain.class);
            builder.addDependency(elytronDomainName, SecurityDomain.class, service.getElytronSecurityDomainInjector());
        }
    } else {
        // This is still picketbox jaas securityDomainContext
        builder.addDependency(SecurityDomainService.SERVICE_NAME.append(domainName), SecurityDomainContext.class, service.getSecurityDomainContextInjector());
    }
    builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE, AbstractServerConfig.class, service.getAbstractServerConfigInjector());
    if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
        builder.addDependency(DependencyType.OPTIONAL, getEJBViewMethodSecurityAttributesServiceName(unit, endpoint), EJBViewMethodSecurityAttributesService.class, service.getEJBMethodSecurityAttributeServiceInjector());
    }
    builder.setInitialMode(Mode.ACTIVE);
    builder.install();
    //add a dependency on the endpoint service to web deployments, so that the
    //endpoint servlet is not started before the endpoint is actually available
    unit.addToAttachmentList(Attachments.WEB_DEPENDENCIES, serviceName);
}
Also used : Endpoint(org.jboss.wsf.spi.deployment.Endpoint) ManagedEndpoint(org.jboss.ws.common.management.ManagedEndpoint) EJBEndpoint(org.jboss.as.webservices.metadata.model.EJBEndpoint) ApplicationSecurityDomainService(org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService) ServiceName(org.jboss.msc.service.ServiceName)

Example 15 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class EndpointService method getServiceNamesFromDeploymentUnit.

/**
     * Returns the name of the endpoint services that are to be installed for a given deployment unit
     *
     * @param unit
     * @return
     */
public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {
    final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>();
    Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);
    for (Endpoint ep : deployment.getService().getEndpoints()) {
        endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));
    }
    return endpointServiceNames;
}
Also used : Endpoint(org.jboss.wsf.spi.deployment.Endpoint) ManagedEndpoint(org.jboss.ws.common.management.ManagedEndpoint) EJBEndpoint(org.jboss.as.webservices.metadata.model.EJBEndpoint) ServiceName(org.jboss.msc.service.ServiceName) ArrayList(java.util.ArrayList) Deployment(org.jboss.wsf.spi.deployment.Deployment)

Aggregations

Endpoint (org.jboss.wsf.spi.deployment.Endpoint)19 ServiceName (org.jboss.msc.service.ServiceName)6 HttpEndpoint (org.jboss.wsf.spi.deployment.HttpEndpoint)5 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)3 EJBEndpoint (org.jboss.as.webservices.metadata.model.EJBEndpoint)3 Deployment (org.jboss.wsf.spi.deployment.Deployment)3 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 WSEndpointConfigMapping (org.jboss.as.webservices.deployers.WSEndpointConfigMapping)2 ModelNode (org.jboss.dmr.ModelNode)2 ManagedEndpoint (org.jboss.ws.common.management.ManagedEndpoint)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Vector (java.util.Vector)1 OperationFailedException (org.jboss.as.controller.OperationFailedException)1 PathAddress (org.jboss.as.controller.PathAddress)1 ApplicationSecurityDomainService (org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService)1 DeploymentResourceSupport (org.jboss.as.server.deployment.DeploymentResourceSupport)1 POJOEndpoint (org.jboss.as.webservices.metadata.model.POJOEndpoint)1 WSEndpointDeploymentUnit (org.jboss.as.webservices.publish.WSEndpointDeploymentUnit)1 ParamValueMetaData (org.jboss.metadata.javaee.spec.ParamValueMetaData)1