Hello,
I am not quite sure I follow what are you trying to achieve here.
I can see you are trying to register a synthetic interceptor via WeldAfterBeanDiscovery.addInterceptor().
What I am missing is how do you bind this interceptor to your PostConstructInjectionEJBResource?
Because interceptors registered via WeldAfterBeanDiscovery are those that work on based on interceptor bindings and there is no binding on your Resource class.
Could you elaborate a little please?
Matej
----- Original Message -----
> From: "Rebecca Searls" <rsearls@redhat.com>
> To: weld-dev@lists.jboss.org
> Sent: Monday, July 22, 2019 8:37:16 PM
> Subject: [weld-dev] Creating default interceptor for EJBs
>
>
> Resteasy would like to address the following scenario with a default
> interceptor
> that is executed after classes defined in an @Interceptors stmt are executed.
>
> For example a customer provides an EJB with a defined @Interceptors stmt.
>
> @Path("/ejb")
> @Stateless
> @Interceptors ({PostConstructInjectionEJBInterceptor.class})
> public class PostConstructInjectionEJBResource {
> @Size(max=3)
> private String t = "yz";
>
> @Path("get")
> @GET
> public String get() {
> return t;
> }
>
> public void setT(String t) {
> this.t = t;
> }
> }
>
> Resteasy provides a CDI extension class, ResteasyCdiExtension. This is where
> I am trying to made the addition. I've reviewed the Weld docs and tried
> wrapping the class with an @Interceptor both with and without @Priority;
> using WeldAfterBeanDiscovery's addInterceptor method all without success.
>
> Would you provide advise as to how best to address this?
>
> _______________________________________________
> weld-dev mailing list
> weld-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev