@Override public void start(final Deployment dep) { final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class); if (unit instanceof WSEndpointDeploymentUnit) return; for (final Endpoint endpoint : dep.getService().getEndpoints()) { ModelNode op = null; try { op = unit.createDeploymentSubModel(WSExtension.SUBSYSTEM_NAME, PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8"))); } catch (final UnsupportedEncodingException e) { throw new RuntimeException(e); } op.get(ENDPOINT_NAME).set(getName(endpoint)); op.get(ENDPOINT_CONTEXT).set(getContext(endpoint)); op.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName()); op.get(ENDPOINT_TYPE).set(endpoint.getType().toString()); op.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl"); } }
private static boolean isElytronSecurityDomain(Endpoint endpoint, String domainName) { final ServiceName serviceName; if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { serviceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY.getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class); } else { serviceName = ELYTRON_DOMAIN_CAPABILITY.getCapabilityServiceName(domainName, SecurityDomain.class); } return currentServiceContainer().getService(serviceName) != null; }
@Override public void start(final Deployment dep) { final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class); if (unit instanceof WSEndpointDeploymentUnit) return; final DeploymentResourceSupport deploymentResourceSupport = unit.getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT); for (final Endpoint endpoint : dep.getService().getEndpoints()) { final ModelNode endpointModel; try { endpointModel = deploymentResourceSupport.getDeploymentSubModel(WSExtension.SUBSYSTEM_NAME, PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8"))); } catch (final UnsupportedEncodingException e) { throw new RuntimeException(e); } endpointModel.get(ENDPOINT_NAME).set(getName(endpoint)); endpointModel.get(ENDPOINT_CONTEXT).set(getContext(endpoint)); endpointModel.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName()); endpointModel.get(ENDPOINT_TYPE).set(endpoint.getType().toString()); endpointModel.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl"); } }
private static boolean isElytronSecurityDomain(Endpoint endpoint, String domainName) { final ServiceName serviceName; if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { serviceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY.getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class); } else { serviceName = ELYTRON_DOMAIN_CAPABILITY.getCapabilityServiceName(domainName, SecurityDomain.class); } return currentServiceContainer().getService(serviceName) != null; }
@Override public void start(final Deployment dep) { final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class); if (unit instanceof WSEndpointDeploymentUnit) return; final DeploymentResourceSupport deploymentResourceSupport = unit.getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT); for (final Endpoint endpoint : dep.getService().getEndpoints()) { final ModelNode endpointModel; try { endpointModel = deploymentResourceSupport.getDeploymentSubModel(WSExtension.SUBSYSTEM_NAME, PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8"))); } catch (final UnsupportedEncodingException e) { throw new RuntimeException(e); } endpointModel.get(ENDPOINT_NAME).set(getName(endpoint)); endpointModel.get(ENDPOINT_CONTEXT).set(getContext(endpoint)); endpointModel.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName()); endpointModel.get(ENDPOINT_TYPE).set(endpoint.getType().toString()); endpointModel.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl"); } }
endpoint.setProperty(SECURITY_DOMAIN_NAME, domainName); if (isElytronSecurityDomain(endpoint, domainName)) { if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { ServiceName ejbSecurityDomainServiceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY .getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class); if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { builder.addDependency(getEJBViewMethodSecurityAttributesServiceName(unit, endpoint), EJBViewMethodSecurityAttributesService.class, service.getEJBMethodSecurityAttributeServiceInjector());
private InvocationHandler getInvocationHandler(final Endpoint ep) { final InvocationType invocationType = InvocationType.valueOf(ep.getType().toString()); return spiProvider.getSPI(InvocationHandlerFactory.class).newInvocationHandler(invocationType); }
endpoint.setProperty(SECURITY_DOMAIN_NAME, domainName); if (isElytronSecurityDomain(endpoint, domainName)) { if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { ServiceName ejbSecurityDomainServiceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY .getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class); if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { ejbMethodSecurityAttributeService = builder.requires(getEJBViewMethodSecurityAttributesServiceName(unit, endpoint));
@Override public void start(final StartContext context) { WSLogger.ROOT_LOGGER.starting(name); final String domainName = (String)endpoint.getProperty(SECURITY_DOMAIN_NAME); if (isElytronSecurityDomain(endpoint, domainName)) { if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomain.get().getSecurityDomain())); } else { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.get())); } } else { endpoint.setSecurityDomainContext(new SecurityDomainContextImpl(securityDomainContext.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); }
@Override public void start(final StartContext context) throws StartException { WSLogger.ROOT_LOGGER.starting(name); final String domainName = (String)endpoint.getProperty(SECURITY_DOMAIN_NAME); if (isElytronSecurityDomain(endpoint, domainName)) { if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomainValue.getValue().getSecurityDomain())); } else { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.getValue())); } } else { endpoint.setSecurityDomainContext(new SecurityDomainContextImpl(securityDomainContextValue.getValue())); } if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { final EJBViewMethodSecurityAttributesService ejbMethodSecurityAttributeService = ejbMethodSecurityAttributeServiceValue.getValue(); endpoint.addAttachment(EJBMethodSecurityAttributeProvider.class, new EJBMethodSecurityAttributesAdaptor(ejbMethodSecurityAttributeService)); } final List<RecordProcessor> processors = endpoint.getRecordProcessors(); for (final RecordProcessor processor : processors) { registerRecordProcessor(processor, endpoint); } final EndpointMetricsFactory factory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class); endpoint.setEndpointMetrics(factory.newEndpointMetrics()); registerEndpoint(endpoint); endpoint.getLifecycleHandler().start(endpoint); }