BeanManager.getReference(...) has the same wording as BeanManager.getBeans(...) (beside the specified event): "IllegalStateException if called during application initialization, before the link AfterDeploymentValidation event is fired" but calls to BeanManager.getReference(...) during AfterDeploymentValidation work well without activating org.jboss.weld.nonPortableMode. Calls to BeanManager.getBeans(...) fail during AfterBeanDiscovery
Both say before the event is fired, not during. However, either both should work (according to CDI spec) or both should not work.
|