"kabir.khan(a)jboss.com" wrote :
| Meaning that the bean1 supplies qualifier 'a', bean2 supplies qualifiers
'a', 'b' and bean3 uses 'a' by default when looking for other
beans to inject into it. So when injecting SomeBean instances into bean3, bean1 will be
chosen.
This looks wrong or at least not the Guice/Weld concept like.
Afair Guice/Weld usage goes like this:
@Blue @Red class FooX implements Foo
@Blue class FooY implements Foo
@Inject @Blue Foo foo
it would throw an exception not knowing which one to choose, as both are supplying @Blue.
You would have to be more precise, having both @Red and @Blue on injection point.
The default qualifier on the bean/class shouldn't imply exact matching,
it should just imply that we always need that qualifier for all (non-explicit?) injection
points.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267632#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...