2 Replies Latest reply on Sep 30, 2006 10:16 AM by Chris Lowe

    @LoggedIn kills injection in beans

    hdslkf hklsdg Apprentice

      I have an abstract bean that encapsulates common functions (store, delete, etc.). It also contains some properties like the EntityManager or the Logger, which are injected. (If you wonder why I want abstract classes, then look at the DRY thread: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=86529)

      Concrete classes inherited all that stuff from that abstract superclass and were able to access those injected properties... until now. I added a @LoggedIn interceptor (from booking example) to the concrete class and now Seam injection does not work anymore. The injected properties from the abstract superclass as well as those from the concrete subclass are all null now. Only the EntityManager exists, but this one gets injected by EJB3, not by Seam.

      If I remove @LoggedIn everything is fine again.

      @Experts: Could you please have a look at the LoggedInInterceptor (from booking example) and tell me why it prevents injection in subclasses? I have absolutely no clue :(.

      btw: Even when inheriting from non-abstract superclasses Seam injection also doesn't work at all anymore.