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

Richard Hightower (JIRA) jira-events at lists.jboss.org
Tue May 10 20:09:18 EDT 2011

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

Richard Hightower commented on CDI-14:

Some utility methods on the BeanManager for making common operations equate to oneliners would be nice....

public Object getBeanByName(String name);
public <T> T getBeanByName(Class<T> type, String name);
public <T> T getBeanByType(Class<T> type, Annotation... qualifiers);

Or perhaps just add a utility class that takes a BeanManager and provides these if we don't want to clutter up BeanManager.

This would be for cases when a developer can't use injection.

> 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