[jbosstools-issues] [JBoss JIRA] (JBIDE-17812) "No bean is eligible for injection" warning for beans added in AfterBeanDiscovery

Alexey Kazakov (JIRA) issues at jboss.org
Mon Jul 14 16:26:29 EDT 2014


     [ https://issues.jboss.org/browse/JBIDE-17812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Kazakov updated JBIDE-17812:
-----------------------------------

    Fix Version/s: LATER
                       (was: 4.2.0.CR1)


> "No bean is eligible for injection" warning for beans added in AfterBeanDiscovery
> ---------------------------------------------------------------------------------
>
>                 Key: JBIDE-17812
>                 URL: https://issues.jboss.org/browse/JBIDE-17812
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cdi-extensions
>            Reporter: Ron Šmeral
>            Assignee: Viacheslav Kabanovich
>             Fix For: LATER
>
>
> JBDS shows _No bean is eligible for injection to the injection point_ warning for injection points where the beans are provided by an extension in the ABD event:
> {code:java|title=ByIdExtensionTest.java}
> @Inject @ById("rbenevides") 
> private Person rafael;
> {code}
> * shows _No bean is eligible for injection to the injection point \[JSR-299 §5.2.1\]_
> {code:java|title=ByIdExtension.java}
> public void afterBeanDiscovery(@Observes AfterBeanDiscovery abd, BeanManager bm) {
>     for (final String idValue : ids) {
>         BeanBuilder<Person> beanBuilder = new BeanBuilder<Person>(bm)
>                 .beanClass(Person.class)
>                 .types(Person.class, Object.
>                 .qualifiers(new ByIdLiteral(idValue))
>                 .beanLifecycle(new PersonContextualLifecycle(idValue));
>         abd.addBean(beanBuilder.create());
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)



More information about the jbosstools-issues mailing list