[cdi-dev] [JBoss JIRA] (CDI-61) Producers and beans that are under construction

Antoine Sabot-Durand (JIRA) issues at jboss.org
Tue Sep 16 11:13:05 EDT 2014


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

Antoine Sabot-Durand edited comment on CDI-61 at 9/16/14 11:12 AM:
-------------------------------------------------------------------

The only rule for this use case in the spec regarding circularities (http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#injection_el_resolution)

{quote}
The container is required to support circularities in the bean dependency graph where at least one bean participating in every circular chain of dependencies has a normal scope, as defined in Normal scopes and pseudo-scopes. The container is not required to support circular chains of dependencies where every bean participating in the chain has a pseudo-scope.
{quote}

And yet it's not exactly this use case.

Weld 2.1.x support this use case with a warning while OWB 1.2.6 crash with a stack overflow. 
Is there any objection to be explicit and tell that the container doesn't have to support this kind of circularities?


was (Author: antoinesabot-durand):
The only rule for this use case in the spec regarding circularities (http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#injection_el_resolution)

{quote}
The container is required to support circularities in the bean dependency graph where at least one bean participating in every circular chain of dependencies has a normal scope, as defined in Normal scopes and pseudo-scopes. The container is not required to support circular chains of dependencies where every bean participating in the chain has a pseudo-scope.
{quote}

Weld 2.1.x support this use c

> Producers and beans that are under construction
> -----------------------------------------------
>
>                 Key: CDI-61
>                 URL: https://issues.jboss.org/browse/CDI-61
>             Project: CDI Specification Issues
>          Issue Type: Bug
>          Components: Beans
>    Affects Versions: 1.0
>            Reporter: Pete Muir
>             Fix For: 2.0 (discussion)
>
>
> I think we need the spec to say something about cases where an injection point of a bean resolves to a producer method of the same bean. The implementation should detect that this is a definition error. It shouldn't try to call a producer method on a non-fully-initialized bean.



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


More information about the cdi-dev mailing list