I'm extending hibernate.EmptyInterceptor and in my implementation I would like to have autowired to some services but they return null. I added a @Component annotation over the class. My code:
<property name="jpaPropertyMap">
<map>
<entry key="javax.persistence.transactionType" value="JTA" />
<entry key="hibernate.current_session_context_class" value="jta" />
<entry key="hibernate.transaction.manager_lookup_class"
value="com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup" />
<entry key="hibernate.connection.autocommit" value="false" />
<entry key="hibernate.ejb.interceptor" value="com.net.filter.AuditInterceptor"/>
</map>
</property>
and the class :
@SuppressWarnings("serial")
@Component
public class AuditInterceptor extends EmptyInterceptor {
@Autowired
private IUserSessionService userSessionService;