You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Antonin Stefanutti (JIRA)" <ji...@apache.org> on 2015/11/06 11:05:27 UTC
[jira] [Updated] (OWB-1097) ProcessInjectionTarget event is fired
when BeanManager.createInjectionTarget or
InjectionTargetFactory.createInjectionTarget is called
[ https://issues.apache.org/jira/browse/OWB-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonin Stefanutti updated OWB-1097:
------------------------------------
Description:
In the following example:
{code}
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)));
}
}
{code}
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.
was:
In the following example:
{code}
<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)));
}
{code}
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.
> ProcessInjectionTarget event is fired when BeanManager.createInjectionTarget or InjectionTargetFactory.createInjectionTarget is called
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Key: OWB-1097
> URL: https://issues.apache.org/jira/browse/OWB-1097
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Lifecycle
> Affects Versions: 1.6.2
> Reporter: Antonin Stefanutti
>
> In the following example:
> {code}
> 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)));
> }
> }
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)