[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 Dec 12 16:48:21 EST 2016
[ https://issues.jboss.org/browse/JBIDE-17812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Kazakov reassigned JBIDE-17812:
--------------------------------------
Assignee: Jeff MAURY (was: Alexey Kazakov)
> "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: Jeff MAURY
> 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
(v7.2.3#72005)
More information about the jbosstools-issues
mailing list