[cdi-dev] [JBoss JIRA] Commented: (CDI-14) Add instance() method to BeanManager

Pete Muir (JIRA) jira-events at lists.jboss.org
Wed May 11 09:57:19 EDT 2011


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

Pete Muir commented on CDI-14:
------------------------------

The original proposal is to add a utility method to BeanManager which returns an Instance<Object> which can be used to do programmatic lookup. Apart from the isDependentScoped method Instance exposes all of the methods you have above, and also allows for subselection. We can add a select(String beanName) to Instance easily if needed (Rick indicates that it is). This prevents us duplicating an existing API and means we don't have to make BM much more complex.


> Add instance() method to BeanManager
> ------------------------------------
>
>                 Key: CDI-14
>                 URL: https://issues.jboss.org/browse/CDI-14
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Resolution
>    Affects Versions: 1.0
>            Reporter: Pete Muir
>             Fix For: 1.1 (Proposed)
>
>
> Currently obtaining a contextual reference is quite a complex operation, adding a method like:
> Instance<Object> instance();
> would make it much easier.

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


More information about the cdi-dev mailing list