[cdi-dev] [JBoss JIRA] (CDI-255) Support for Implicit Producers

Antonio Goncalves (JIRA) issues at jboss.org
Sat Sep 20 08:39:02 EDT 2014


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

Antonio Goncalves edited comment on CDI-255 at 9/20/14 8:38 AM:
----------------------------------------------------------------

When you look at all the Java EE 7 specs, you don't find much : 

*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)

{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}

*JMS 2.0* (§ 12.4.3. Injection syntax)

{code}
@Inject
private JMSContext context;
{code}

So definitely a section on Java EE about implicit producers

BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}

Other Java EE objects that could be implicitelly produced :

{code}
@Inject Principal currentUser;     // From JAAS
@Inject FacesContext facesContext; // From JSF
@Inject EntityManager em;          // From JPA, handy when there is only one persistence unit
{code}


was (Author: agoncal):
When you look at all the Java EE 7 specs, you don't find much : 

*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)

{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}

*JMS 2.0* (§ 12.4.3. Injection syntax)

{code}
@Inject
private JMSContext context;
{code}

So definitely a section on Java EE about implicit producers

BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}

> Support for Implicit Producers
> ------------------------------
>
>                 Key: CDI-255
>                 URL: https://issues.jboss.org/browse/CDI-255
>             Project: CDI Specification Issues
>          Issue Type: Tracker
>    Affects Versions: 1.0
>            Reporter: Pete Muir
>
> An implicit producer could be registered for every unambiguous resource the Java EE container knows about.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)



More information about the cdi-dev mailing list