]
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}