[cdi-dev] [JBoss JIRA] (CDI-334) Issues with global enablement of alternatives

Pete Muir (JIRA) jira-events at lists.jboss.org
Tue Apr 2 09:16:45 EDT 2013


    [ https://issues.jboss.org/browse/CDI-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764369#comment-12764369 ] 

Pete Muir commented on CDI-334:
-------------------------------

Text for resolving ambiguous dependencies changed to:

{quote}When an ambiguous dependency exists, the container attempts to resolve the ambiguity. The container eliminates all eligible beans that are not alternatives, except for producer methods and fields of beans that are alternatives. If:
there is exactly one bean remaining, the container will select this bean, and the ambiguous dependency is called resolvable.
all the beans left are alternatives with a priority, or producer methods or fields of beans that are alternatives with a priority, then the container will determine the highest priority value, and eliminate all beans, except for alternatives with the highest priority and producer methods and fields of alternatives with the highest priority value. If there is exactly one bean remaining, the container will select this bean, and the ambiguous dependency is called resolvable.{quote}
                
> Issues with global enablement of alternatives
> ---------------------------------------------
>
>                 Key: CDI-334
>                 URL: https://issues.jboss.org/browse/CDI-334
>             Project: CDI Specification Issues
>          Issue Type: Bug
>          Components: Beans, Resolution
>    Affects Versions: 1.1.PFD
>            Reporter: Jozef Hartinger
>            Assignee: Pete Muir
>             Fix For: 1.1.FD
>
>
> * Section 5.1 last paragraph does not reflect global enablement of alternatives.
> * Section 5.1.1 fails to define how @Priority relates to:
> ** alternative stereotypes
> ** producers
> * Section 5.1.6 does not reflect global enablement of alternatives
> Section 5.2.2:
> ** generally the section needs to take global enablement of alternatives into account
> ** "If all the beans left are alternatives with a priority, then the container will select the alternative with the highest priority, and the
> ambiguous dependency is called resolvable."
> *** there is no guarantee that there is a single alternative with the highest priority. The spec should define what happens in that case.
> *** also, the statement should not only consider "alternatives" but also producers defined on alternatives
> * Section 5.3.1 - same as 5.2.2
> * Recommended priority ranges for alternatives should be defined somewhere

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list