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));
}
}
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);
}
}
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);
}
}
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);
}
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;
}
Aggregations