[weld-issues] [JBoss JIRA] Commented: (WELD-310) Producer called on Bean that is under construction

Gavin King (JIRA) jira-events at lists.jboss.org
Sun Dec 27 10:37:30 EST 2009


    [ https://jira.jboss.org/jira/browse/WELD-310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12501666#action_12501666 ] 

Gavin King commented on WELD-310:
---------------------------------

It sounds like the same issue. That comment captures the problem I'm referring to. The source for Foo doesn't matter.

What happened was that in order to inject the Foo, the container had to obtain an instance by calling the producer method ... on the instance of Bar that was currently being constructed.

> Producer called on Bean that is under construction
> --------------------------------------------------
>
>                 Key: WELD-310
>                 URL: https://jira.jboss.org/jira/browse/WELD-310
>             Project: Weld
>          Issue Type: Bug
>          Components: Producers (Methods, Fields and Disposers)
>    Affects Versions: 1.0.0.GA
>            Reporter: Gavin King
>            Assignee: Pete Muir
>             Fix For: 1.0.1.CR1
>
>
> The following code results in a call to Foo.foo() for a bean that has not yet been fully constructed:
> class Bar {
>     @Inject void injectFoo(Foo foo) {}
>     @Produces Foo produceFoo() { return new Foo(); }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list