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

Pete Muir updated CDI-34:
-------------------------

    Affects Version/s: 1.0


> Make special note in the spec about beans that are @Named via a stereotype 
> being unselectable with Instance.select()
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CDI-34
>                 URL: https://issues.jboss.org/browse/CDI-34
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>    Affects Versions: 1.0
>            Reporter: Shane Bryzak
>            Priority: Minor
>
> For example, say we have the following bean:
> public @Model class Foo implements IFoo { }
> And we have the following injection point within another bean:
>   @Inject Instance<Foo> fooInstance;
> It is not possible to select Foo via name using the Instance:
>   // This results in an UnsatisfiedDependencyException
>   Foo foo = fooInstance.select(new NamedLiteral("foo")).get();
> Instead, Foo must be annotated directly with the @Named annotation itself:
> /*
>  * This Foo can be selected by name
>  */
> public @Named @RequestScoped Foo implements IFoo { }
> This special case might be worthwhile mentioning in the next revision of the 
> spec.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to