myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul McMahan (JIRA)" <>
Subject [jira] Commented: (MYFACES-1761) Handling PostConstruct annotations - wrong order
Date Mon, 19 Nov 2007 16:32:43 GMT


Paul McMahan commented on MYFACES-1761:

Feedback from the MyFaces dev list indicates that changing the LifecycleProvider interface
in a maintenance release will be OK.

During that conversation Bernhard offered to provide an alternative patch that will bring
together the best aspects of both patches already proposed for this issue.  Specifically,
his proposal is:

what about introducing "InjectionTasks"? The ManagedBeanBuilder, for example, could register
an InjectionTask that handles the injection of managed properties. In fact, I'm thinking of
a more general approach of your patch so that others can perform additional injection too.

public interface InjectionTask {

    public void inject(Object bean) throws ...;



> Handling PostConstruct annotations - wrong order
> ------------------------------------------------
>                 Key: MYFACES-1761
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions:  1.2.0, 1.2.1-SNAPSHOT
>            Reporter: Bernhard Huemer
>            Assignee: Paul McMahan
>             Fix For: 1.2.1-SNAPSHOT
>         Attachments: MYFACES-1761-01.diff, MyFaces-1761.patch,
> The specification states that managed bean methods annotated with @PostConstruct have
to be called after the object is initialized and after dependency injection is performed.
However, MyFaces calls those methods after the bean instance is created but before dependency
injection is performed (for example, see
). In order to resolve this bug the LifecycleProvider interface has to be changed. Currently
there's only one method responsible for creating/initializing a new bean: newInstance(). This
design choice implicates that there's no possibility to seperate the steps "creating the bean"
and "postconstructing the bean".

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message