Naresh,

I would stick to the same knowledge you've used for scoping decisions in any 
web app.  I have tended to favor request scope for the reasons you have 
mentioned.  You may want to check out t:saveState and t:updateActionListener if 
you have not already.  I think most experienced JSF developers will agree this 
unfortunately makes application development more expensive because of the 
learning curve and work required to manage state over a stateless protocol.

I place read only managed beans in app scope.

Dennis Byrne

>-----Original Message-----
>From: Naresh Bhatia [mailto:[EMAIL PROTECTED]
>Sent: Monday, September 18, 2006 09:39 PM
>To: 'MyFaces Discussion'
>Subject: Best practices for choosing managed bean scope
>
>What are the best practices for choosing managed bean scope? In the
>past, I have been avoiding session scope in favor of request scope for
>obvious reasons (memory requirements, no need for session failover etc).
>But I see that many JSF examples put beans in session scope without
>explaining why this is needed. For example, the Trinidad TreeTable demo
>puts its managed beans in session. Is this really necessary? Are there
>any best practices in trying to decide the scope of managed beans?
>
>Thanks.
>Naresh
>


Reply via email to