0 Replies Latest reply on Mar 9, 2013 9:52 PM by kwintesencja

    Interceptor issue with parametrized EJB

    kwintesencja

      Hi everyone,

       

      I have four classes and an interceptor that isnt called in a very specific situation, the classes are:

       

      an abstract boundary with a generic type parameter

       

      public abstract class BaseBoundary<T extends Serializable> implements Serializable

       

       

      a concrete boundary(an EJB) which is intercepted by a CDI interceptor 

       

      @Stateless

      @MyInterceptor

      public class MyBoundary extends BaseBoundary<Long>...

       

      An abstract base bean which has a boundary as parametrized type(and also as attribute)

       

      public abstract class BaseBean<Boundary extends BaseBoundary<T>,T extends Serializable> implements Serializable{

       

      and a concrete CDI bean

       

      @Named

      @SessionScoped

      public class MyBean extends BaseBean<MyBoundary,Long> {

       

      in this constallation the interceptor isnt called, it only works when i remove the @Stateless annotation OR if i keep the Stateless but remove the generic type parameter from Boundaries

       

      i've made a video which shows the issue: http://www.youtube.com/watch?v=iuCU9nfKqrs

       

      and also shared the code in github: https://github.com/rmpestano/cdi-interceptor-issue

       

       

      Tested it under glassfish 3.1.2.2 and JBoss AS 7.1.1-Final

       

      any help is appreciated, thanks in advance.