One recent change, is for [https://issues.jboss.org/browse/WFLY-2387], WildFly 11+, is delaying Hibernate CDI beanmanager registration, until after CDI event javax.enterprise.inject.spi.AfterDeploymentValidation is triggered for the application deployment.
During the javax.enterprise.inject.spi.AfterDeploymentValidation event, the Hibernate org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager callback is invoked.
I can think of two possibilities, either we removed something in Hibernate ORM 5.1 that previously helped your processBean() to see the EntityManager, Or somehow, the mentioned change to wait until javax.enterprise.inject.spi.AfterDeploymentValidation, to complete the bean manager registration with Hibernate.
One course of action, could be to compare the ORM 5.1 CDI bean manager registration code, with the ORM 4.3 code, to see if we did remove some code that previously helped your processBean extension, to see the ORM entity manager.
I’m not sure if it would help, but an entity listener injection test is here, that might be an example of hooking into the EntityManager differently. I don’t think this really helps you, but wanted to mention it.
Scott