This content has been marked as final.
Show 1 reply
-
1. Re: Multiple otherwise identical producer methods?
nickarls Apr 27, 2010 8:46 AM (in response to ljnelson)If two producers produce the same result (type and qualifiers) the result is an ambiguous resolve exception.
You could have something like
@Inject Instance<Foo> foos; // here go all beans that satisfy the Foo type or interface @Produces @TheRight public produceFoo() { // iterate over foos and return the one you want }
Check out Instance in the spec or refguide.