I have updated to Hibernate 5.1 while moving from JBoss 6.2 to 7.1 which is based on Wildfly 11. We’re using JPA 2.1 I need the EntityManager that is created to be available in WELD and it appears Hibernate is not putting it there any longer. I have a CDI extension that is observing using
<X> void processBean(@Observes ProcessBean<X> processBean)
and looking at the types of the bean wrapped by processBean. It could see an EntityManager in Hibernate 4.3, but does not in 5.1.
I know things are getting fired up by virtue of some logging messages:
[org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl] (ServerService Thread Pool -- 98) Found use of deprecated `hibernate.classLoader.application` setting; use `hibernate.classLoaders` instead
Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator]. Adding Integrator [org.hibernate.secure.spi.JaccIntegrator]. Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator] Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator] Adding Integrator [org.hibernate.envers.boot.internal.EnversIntegrator]
I’ve tried to revert to the single phase JPA bootstrap by setting wildfly.jpa.twophasebootstrap to false. I’ve also tried hibernate.delay_cdi_access set to both true and false. Neither has had any affect.
Any suggestions to get the EntityManager bound in CDI?