1 Reply Latest reply on Dec 4, 2009 2:42 AM by kapitanpetko

    Injection in hibernate.ejb.interceptor doesn't work

    kirpi4ik

      Hi,


      I have an hibernate Interceptor which is declared in persistence.xml(hibernate.ejb.interceptor property), It is working fine, but if I would like to use Seam Injection(by making my interceptor - Seam component) doesn't work. I tried by using @Name,@Startup annotation. But it does not inject the components. Components are valid because I can inject them in other components but not in the Interceptor.


      @Name("auditLogInterceptor")
      @Scope(ScopeType.SESSION)
      @Startup
      public class AuditLogInterceptor extends EmptyInterceptor {
          @In
          EntityManager entityManager;
      ..
      }


      but entityManager always is null.


      What I'm doing wrong?


      Thank you,
      Dima