use of org.jboss.as.weld.interceptors.Jsr299BindingsCreateInterceptor in project wildfly by wildfly.
the class WeldComponentIntegrationProcessor method addJsr299BindingsCreateInterceptor.
private static void addJsr299BindingsCreateInterceptor(final ComponentConfiguration configuration, final ComponentDescription description, final String beanName, final ServiceName weldServiceName, ServiceBuilder<WeldComponentService> builder, final ServiceName bindingServiceName, final ComponentInterceptorSupport componentInterceptorSupport) {
//add the create interceptor that creates the CDI interceptors
final Jsr299BindingsCreateInterceptor createInterceptor = new Jsr299BindingsCreateInterceptor(description.getBeanDeploymentArchiveId(), beanName, componentInterceptorSupport);
configuration.addPostConstructInterceptor(new ImmediateInterceptorFactory(createInterceptor), InterceptorOrder.ComponentPostConstruct.CREATE_CDI_INTERCEPTORS);
builder.addDependency(weldServiceName, WeldBootstrapService.class, createInterceptor.getWeldContainer());
builder.addDependency(bindingServiceName, InterceptorBindings.class, createInterceptor.getInterceptorBindings());
}
use of org.jboss.as.weld.interceptors.Jsr299BindingsCreateInterceptor in project wildfly by wildfly.
the class WeldComponentIntegrationProcessor method addJsr299BindingsCreateInterceptor.
private static void addJsr299BindingsCreateInterceptor(final ComponentConfiguration configuration, final ComponentDescription description, final String beanName, final ServiceName weldServiceName, ServiceBuilder<?> builder, final ServiceName bindingServiceName, final ComponentInterceptorSupport componentInterceptorSupport) {
// add the create interceptor that creates the Jakarta Contexts and Dependency Injection Interceptors
final Supplier<WeldBootstrapService> weldContainerSupplier = builder.requires(weldServiceName);
final Supplier<InterceptorBindings> interceptorBindingsSupplier = builder.requires(bindingServiceName);
final Jsr299BindingsCreateInterceptor createInterceptor = new Jsr299BindingsCreateInterceptor(weldContainerSupplier, interceptorBindingsSupplier, description.getBeanDeploymentArchiveId(), beanName, componentInterceptorSupport);
configuration.addPostConstructInterceptor(new ImmediateInterceptorFactory(createInterceptor), InterceptorOrder.ComponentPostConstruct.CREATE_CDI_INTERCEPTORS);
}
Aggregations