On May 26, 2010, at 11:10 AM, "Simon Lessard" <Simon_Lessard(a)dmr.ca>
wrote:
Hi all,
The method should definitely be called imho. The specification
should be clarified by removing the various scopes, maybe to
something like the following:
"Methods on managed beans annotated with @PostConstruct, must be
called by the JSF implementation after resource injection is
performed (if any), but before the bean is placed in its scope, if
any."
We could also change the "JSF implementation" part by "JSF compliant
managed bean engine" so that the behavior is expected from any new
extensions as well.
Regards,
~ Simon
________________________________
From: jsr-314-open-bounces(a)jcp.org on behalf of Martin Marinschek
Sent: Tue 2010-05-25 16:22
To: jsr-314-open(a)jcp.org
Subject: Re: [jsr-314-open] [2.0RevA-C071] none scoped beans
and@PostConstruct
Hi Ed,
please take a look at other bean-containers before you decide - Spring
e.g. does call init-methods on prototype bean, if so configured. I
think the user would be very surprised if s/he annotates a method and
it is not being called.
best regards,
Martin
On Tue, May 25, 2010 at 8:23 PM, Jason Lee <jason(a)steeplesoft.com>
wrote:
> On 5/25/10 1:21 PM, Ed Burns wrote:
>>
>> This is in the Change Log, and in issue 1683 [1].
>>
>> Section 5.4.1 of the JSF 1.2 spec states:
>>
>> Methods on managed beans declared to be in request, session, or
>> application scope, annotated with @PostConstruct, must be called
>> by the
>> JSF implementation after resource injection is performed (if any)
>> but
>> before the bean is placed into scope.
>>
>> Mojarra currently *does* cause these methods to be called,
>>
>> What's right? Call it or not call it? I think not call it.
>> Thoughts?
>>
>>
>
> What's the rationale for not calling it? I would think that would
> be a very
> confusing departure from expected behavior.
>
> --
> Jason Lee
> Senior Member of Technical Staff at Oracle
>
http://blogs.steeplesoft.com <
http://blogs.steeplesoft.com/>
>
>
--
http://www.irian.at <
http://www.irian.at/>
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
<winmail.dat>