Hibernate version: hibernate 3.1 rc1
I try to use the property hibernate.ejb.interceptor to initialize a Interceptor for my application. It seems that the property is not used (ie code never go through my Interceptor).
Having a look to Configuration, it seems that property is not initialized.
- In the constructor of Configuration reset() method is invoked.
- reset() initialize intercepor to an EmptyIntercpetor:
Code:
interceptor = EmptyInterceptor.INSTANCE;
- In method
Code:
private EntityManagerFactory createEntityManagerFactory(Properties properties, Map workingVars) {
...
else if ( propertyKey.equals( HibernatePersistence.INTERCEPTOR ) && cfg.getInterceptor() == null) {
...
cfg.setInterceptor( (Interceptor) interceptor.newInstance() );
Since inetceptor is initialize with EmptyInterceptor, it is not null. My interceptor set in the config file is not used !