Search in sources :

Example 1 with EJBMethodSecurityAttributesAdaptor

use of org.jboss.as.webservices.security.EJBMethodSecurityAttributesAdaptor in project wildfly by wildfly.

the class EndpointService method start.

@Override
public void start(final StartContext context) {
    WSLogger.ROOT_LOGGER.starting(name);
    if (endpoint.getProperty(ELYTRON_SECURITY_DOMAIN) != null && Boolean.parseBoolean(endpoint.getProperty(ELYTRON_SECURITY_DOMAIN).toString())) {
        if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
            endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomain.get().getSecurityDomain()));
        } else {
            endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.get()));
        }
    }
    if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
        final EJBViewMethodSecurityAttributesService ejbMethodSecurityAttributeService = this.ejbMethodSecurityAttributeService.get();
        endpoint.addAttachment(EJBMethodSecurityAttributeProvider.class, new EJBMethodSecurityAttributesAdaptor(ejbMethodSecurityAttributeService));
    }
    final List<RecordProcessor> processors = endpoint.getRecordProcessors();
    for (final RecordProcessor processor : processors) {
        registerRecordProcessor(processor, endpoint);
    }
    final EndpointMetricsFactory endpointMetricsFactory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class);
    endpoint.setEndpointMetrics(endpointMetricsFactory.newEndpointMetrics());
    registerEndpoint(endpoint);
    endpoint.getLifecycleHandler().start(endpoint);
    ServiceContainerEndpointRegistry.register(aliasName, endpoint);
    endpointConsumer.accept(endpoint);
}
Also used : EndpointMetricsFactory(org.jboss.wsf.spi.management.EndpointMetricsFactory) EJBMethodSecurityAttributesAdaptor(org.jboss.as.webservices.security.EJBMethodSecurityAttributesAdaptor) RecordProcessor(org.jboss.ws.api.monitoring.RecordProcessor) ManagedRecordProcessor(org.jboss.ws.common.monitoring.ManagedRecordProcessor) ElytronSecurityDomainContextImpl(org.jboss.as.webservices.security.ElytronSecurityDomainContextImpl) EJBViewMethodSecurityAttributesService(org.jboss.as.ejb3.security.service.EJBViewMethodSecurityAttributesService)

Aggregations

EJBViewMethodSecurityAttributesService (org.jboss.as.ejb3.security.service.EJBViewMethodSecurityAttributesService)1 EJBMethodSecurityAttributesAdaptor (org.jboss.as.webservices.security.EJBMethodSecurityAttributesAdaptor)1 ElytronSecurityDomainContextImpl (org.jboss.as.webservices.security.ElytronSecurityDomainContextImpl)1 RecordProcessor (org.jboss.ws.api.monitoring.RecordProcessor)1 ManagedRecordProcessor (org.jboss.ws.common.monitoring.ManagedRecordProcessor)1 EndpointMetricsFactory (org.jboss.wsf.spi.management.EndpointMetricsFactory)1