[jbosstools-issues] [JBoss JIRA] (JBIDE-12402) Ambiguous EL names in case of producers of alternative bean classes

Alexey Kazakov (JIRA) jira-events at lists.jboss.org
Mon Aug 20 15:47:14 EDT 2012


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

Alexey Kazakov reassigned JBIDE-12402:
--------------------------------------

    Assignee: Viacheslav Kabanovich  (was: Alexey Kazakov)


I see that the injection is resolved to ManagedBeanUserManager.getUsers()
That is not correct.
It should be resolved to EJBUserManager.getUsers()

See WELD-930 for details.
                
> Ambiguous EL names in case of producers of alternative bean classes
> -------------------------------------------------------------------
>
>                 Key: JBIDE-12402
>                 URL: https://issues.jboss.org/browse/JBIDE-12402
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: CDI
>    Affects Versions: 3.3.0.Final
>            Reporter: Alexey Kazakov
>            Assignee: Viacheslav Kabanovich
>             Fix For: 3.4.0.M1
>
>
> See the example from https://github.com/pmuir/jboss-as-developer-guide/tree/master/quickstarts
> There is org.jboss.as.quickstarts.login.EJBUserManager:
> {code:title=org.jboss.as.quickstarts.login.EJBUserManager|borderStyle=solid}
> ...
> @Named("userManager")
> @RequestScoped
> @Alternative
> @Stateful
> public class EJBUserManager implements UserManager {
> ...
>     @Produces
>     @Named
>     @RequestScoped
>     public List<User> getUsers() throws Exception {
>         ...
>     }
> ...
> }
> {code}
> And there is also another bean org.jboss.as.quickstarts.login.ManagedBeanUserManager:
> {code:title=org.jboss.as.quickstarts.login.ManagedBeanUserManager|borderStyle=solid}
> ...
> @Named("userManager")
> @RequestScoped
> public class ManagedBeanUserManager implements UserManager {
>    @SuppressWarnings("unchecked")
>    @Produces
>    @Named
>    @RequestScoped
>    public List<User> getUsers() throws Exception {
>        ...
>    }
> ...
> }
> {code}
> We have two beans with EL name #{users}
> Try to inject it in some bean:
> @Inject List<User> users;
> There is a warning about ambiguous beans that is not correct. 
> See WELD-930 for details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list