Search in sources :

Example 1 with WeldInterceptorBindingsService

use of org.jboss.as.weld.ejb.WeldInterceptorBindingsService in project wildfly by wildfly.

the class WeldComponentIntegrationProcessor method addWeldInterceptorBindingService.

private static ServiceName addWeldInterceptorBindingService(final ServiceTarget target, final ComponentConfiguration configuration, final Class<?> componentClass, final String beanName, final ServiceName weldServiceName, final ServiceName weldStartService, final String beanDeploymentArchiveId, final ComponentInterceptorSupport componentInterceptorSupport) {
    ServiceName bindingServiceName = configuration.getComponentDescription().getServiceName().append(WeldInterceptorBindingsService.SERVICE_NAME);
    final ServiceBuilder<?> sb = target.addService(bindingServiceName);
    final Consumer<InterceptorBindings> interceptorBindingsConsumer = sb.provides(bindingServiceName);
    final Supplier<WeldBootstrapService> weldContainerSupplier = sb.requires(weldServiceName);
    sb.requires(weldStartService);
    sb.setInstance(new WeldInterceptorBindingsService(interceptorBindingsConsumer, weldContainerSupplier, beanDeploymentArchiveId, beanName, componentClass, componentInterceptorSupport));
    sb.install();
    return bindingServiceName;
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) WeldInterceptorBindingsService(org.jboss.as.weld.ejb.WeldInterceptorBindingsService) InterceptorBindings(org.jboss.weld.ejb.spi.InterceptorBindings) WeldBootstrapService(org.jboss.as.weld.WeldBootstrapService)

Aggregations

WeldBootstrapService (org.jboss.as.weld.WeldBootstrapService)1 WeldInterceptorBindingsService (org.jboss.as.weld.ejb.WeldInterceptorBindingsService)1 ServiceName (org.jboss.msc.service.ServiceName)1 InterceptorBindings (org.jboss.weld.ejb.spi.InterceptorBindings)1