Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.6.2
-
None
-
None
Description
In the following example:
class CdiCamelExtension implements Extension { <T extends CamelContext> void camelContextBeans(@Observes ProcessInjectionTarget<T> pit) { } void addDefaultCamelContext(@Observes AfterBeanDiscovery abd, BeanManager manager) { manager.createInjectionTarget(manager.createAnnotatedType(DefaultCamelContext.class)); manager.getInjectionTargetFactory( manager.createAnnotatedType(DefaultCamelContext.class)) .createInjectionTarget((Bean<DefaultCamelContext>) manager.resolve(manager.getBeans(DefaultCamelContext.class))); } }
Both calls to BeanManager.createInjectionTarget or InjectionTargetFactory.createInjectionTarget triggers the firing of the ProcessInjectionTarget event.
From my understanding of the specification, that should not be the case. What is surprising as well is that the ProcessInjectionTarget observer method is called within the execution of the AfterBeanDiscovery observer method.