[cdi-dev] [JBoss JIRA] (CDI-469) Allow nonbinding producer methods to have scopes

Antonin Stefanutti (JIRA) issues at jboss.org
Mon Sep 15 11:30:03 EDT 2014


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

Antonin Stefanutti commented on CDI-469:
----------------------------------------

[~jharting], indeed, I think that's the general idea. Otherwise stated, the need is to be able to have non {{@Dependent}} producer methods depending on the {{InjectPoint}} and somehow have the resultant produced values _cached_ (i.e. the producer method does not get called twice without the active scope) whenever the {{InjectionPoint}} are _equals_, _equals_ being here defined by qualifiers equality.


> Allow nonbinding producer methods to have scopes
> ------------------------------------------------
>
>                 Key: CDI-469
>                 URL: https://issues.jboss.org/browse/CDI-469
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Beans, Contexts
>    Affects Versions: 1.2.Final
>            Reporter: John Ament
>
> Currently, you cannot have a nonbinding producer method, e.g. one where the annotation is read at runtime, with a scope.  This means that repeated injections always happen.  It would be better if you could scope the nonbinding producer methods, so that the results were bound, e.g. to a request scope, so that look ups can be done once.
> The current way to avoid this is to use a holder object with the proper scope.



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


More information about the cdi-dev mailing list