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
Hibernate interceptors are probably not intercepted :) Use Comonent.getInstance("entitytManager") instead of injection.
HTH