Thanks Craig.

 

At the risk of straying from the subject a bit--I am curious about the JSF bean lifecycle management and why the current strategy was chosen. In the EJB lifecycle, the container manages a pool of scope-agnostic beans that are brought into session on use. The reason for this choice (apart from service interception), I assume, is to obviate the creation (and gc) overhead of new EJBs.

 

Is there a particular reason that JSF doesn’t take this approach (with a jsfActivate() and jsfPassivate() to replace constructor/finalizer semantics)? Isnt the creation/gc overhead of a webapp equal to (or greater) than an EJB app (considering that a page could be requested many more times than EJB calls that it subsequently generates)? I believe that other web frameworks (like Jakarta Tapestry) take the pooled bean approach.

 

Are there any plans in future JSF releases to adopt something like this? I would strongly endorse it as a JSF and myfaces user; our beans are already taking significant performance hits due to the complex nature of the business logic, any help from the stack would be helpful.

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig McClanahan
Sent: Monday, 26 June 2006 10:16 AM
To: MyFaces Discussion
Subject: Re: managed properties

I choose scope for a managed bean just like as for any other bean in a Java based webapp ... if the information is specific to a user but longer lived than a single request, I use session scope.  Otherwise, I generally use request scope to avoid multiple instantiations of the same bean.

Spring 1.x didn't support "request" or "session" scope directly ... I'm glad to see they are adding a way to do that in 2.x.

 

Dhanji.



Craig

 

This correspondence is for the named persons only.
It may contain confidential or privileged information or both.
No confidentiality or privilege is waived or lost by any mis transmission.
If you receive this correspondence in error please delete it from your system immediately and notify the sender.
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient.
Any opinions expressed in this message are those of the individual sender except where the sender expressly,
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.

Reply via email to