The test case attached to this issue uses MyIntegrator to install an interceptor using SessionFactoryBuilder.applyInterceptor.
- The interceptor should be used for new sessions used by the JPA entity manager
- Specifically: The method GlobalInterceptor.onSave should be called when EntityManager.persist gets called
- The interceptor is not used at all when using the JPA EntityManager
Using Hiberante 4.3 is was possible to install an interceptor using Configuration.setInterceptor.
We discovered this issue while upgrading to Wildfly 10.1.0 which includes Hibernate 5.0.10.
This is a critical issue from our point of view, as we have not yet discoverd another hook to install interceptors. Since we are working with the JPA EntityManger we can not use the Session API.
Link to the discussion on the forum: