[weld-dev] Creating default interceptor for EJBs

Rebecca Searls rsearls at redhat.com
Mon Jul 22 14:37:16 EDT 2019


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20190722/159ed79d/attachment.html 


More information about the weld-dev mailing list