[cdi-dev] [JBoss JIRA] (CDI-61) Producers and beans that are under construction
Mark Struberg (Commented) (JIRA)
jira-events at lists.jboss.org
Tue Oct 4 10:46:16 EDT 2011
[ https://issues.jboss.org/browse/CDI-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632175#comment-12632175 ]
Mark Struberg commented on CDI-61:
----------------------------------
found it. This behaviour is defined in JSR-250:
> The PostConstruct annotation is used on a method that needs to be
> executed after dependency injection is done to perform any
> initialization. This method MUST be invoked before the class
> is put into service.
And as JSR-330/299 define that @Inject fields and methods must get called _before_ @PostConstruct methods, we must therefor initialise our beans completely _before_ they are "put into service".
> 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: 1.1 (Proposed)
>
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list