[cdi-dev] [JBoss JIRA] Commented: (CDI-92) Allow injection of Bean object for a bean

Pete Muir (JIRA) jira-events at lists.jboss.org
Sun May 1 13:16:18 EDT 2011


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

Pete Muir commented on CDI-92:
------------------------------

Sometimes it is useful for a bean instance to be able to inject the Bean object which was used to instantiate it in order to inspect the metadata which defined it (it's qualifiers, it's name etc.) allowing:

{code}
class Foo {

   @Inject Bean<Foo> metadata;

   ...
}
{code}

is a neat and concise way to do it.

This is somewhat analagous to being able to inject the EJBContext.

> Allow injection of Bean object for a bean
> -----------------------------------------
>
>                 Key: CDI-92
>                 URL: https://issues.jboss.org/browse/CDI-92
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Beans
>    Affects Versions: 1.0
>            Reporter: Pete Muir
>             Fix For: 1.1 (Proposed)
>
>


--
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