Hi Stas,
I'm not a MyFaces developer, but I believe this is a legitimate, major
issue. I was able to reproduce this problem and what's happening is
MyFaces is creating the bean, doing resource injection, calling the
@PostConstruct method, and _then_ injecting managed properties. The
article you linked makes it very clear that MyFaces needs to create the
bean, perform resource AND managed property injection, and then call the
@PostConstruct method:
"But the flow within the JSF 1.2 RI for instantiating managed beans is
as follows:
1. New the bean declared using the default constructor
2. Inject any |@Resource| declarations
3. Assign any managed-properties declared, cascading this process if
new beans are referenced
4. Call |@PostConstruct| on the bean if declared
5. Store the bean in the correct scope and return"
I have a working patch for this problem if one of the devs would like to
weigh in with their opinion about opening a JIRA issue for this problem
I'd be happy to provide it.
Curtiss Howard