Steve asked me to run the WildFly org.jboss.as.test.integration.ee.injection.support.jpa.EntityListenerInjectionSupportTestCase (our current reproducer from WFLY-2387) with the new Hibernate hibernate.delay_cdi_access property set to true. This has the side effect of delaying the entity class listener to be as late as possible (on first application use I believe). The EntityListenerInjectionSupportTestCase test passes. I did this testing on the ORM 5.0 branch, where as my testing of the ExtendedBeanManager is on ORM master. I suspect that the Hibernate branch does not matter though. I suspect that this is probably about registering the entity listener after the afterDeploymentValidation has occurred. I'll work on a way to notify the ExtendedBeanManager after the CDI afterDeploymentValidation has triggered (in WildFly). I'm not sure why that is important with regard to avoiding the "resolveBean" IllegalArgumentException, but it might be. |