You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Palvin <pa...@towada.com.cn> on 2009/04/10 11:11:30 UTC

[Trinidad] Ask for the backing bean's scope in application.

Hi, 
I'm studing usage the trinidad components recently and I've found that some of the tutorials set the backing bean's scope is session in their demon always and I'm doubt it's performance in auctual project. Who can provide some advise about it. If anyone can provide a more actual tutorials it's very appreciation of my.

Thanks a lots.

Palvin

Re: [Trinidad] Ask for the backing bean's scope in application.

Posted by Palvin <pa...@towada.com.cn>.
Thanks for your advise & studing...
----- Original Message ----- 
From: "Simon Kitching" <sk...@apache.org>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Friday, April 10, 2009 5:51 PM
Subject: Re: [Trinidad] Ask for the backing bean's scope in application.


> Palvin schrieb:
>> Hi,
>> I'm studing usage the trinidad components recently and I've found that
>> some of the tutorials set the backing bean's scope is session in their
>> demon always and I'm doubt it's performance in auctual project. Who can
>> provide some advise about it. If anyone can provide a more actual
>> tutorials it's very appreciation of my.
> 
> This is really a general JSF question, not specific to Trinidad.
> 
> You are quite right to be worried about the use of "session". It works
> fine for simple demo and tutorial applications, but applications with
> lots of users do have to be worried about session-scope usage.
> 
> Unfortunately there isn't an easy answer. This subject could easily fill
> a couple of chapters in a good JSF textbook - but as far as I know, no
> JSF textbook has yet written about this subject.
> 
> The best solution is to just use request-scope for everything. However
> in practice this can be very inconvenient to do.
> 
> There are a number of libraries that provide a "conversation" scope for
> beans, which is somewhere in between "request" and "session" scope. In
> other words, it works like session-scope, but makes it easier to remove
> objects from the session when they are no longer needed. You might like
> to look at:
> * Myfaces Orchestra
> * Trinidad "page flow"
> * Seam
> * Spring WebFlow
> 
> The Myfaces Orchestra site has an overview of what "conversation" scope
> is, and what the difference is between the above implementations.
> 
> Regards,
> Simon
> -- 
> -- Emails in "mixed" posting style will be ignored
> -- (http://en.wikipedia.org/wiki/Posting_style)

Re: [Trinidad] Ask for the backing bean's scope in application.

Posted by Simon Kitching <sk...@apache.org>.
Palvin schrieb:
> Hi,
> I'm studing usage the trinidad components recently and I've found that
> some of the tutorials set the backing bean's scope is session in their
> demon always and I'm doubt it's performance in auctual project. Who can
> provide some advise about it. If anyone can provide a more actual
> tutorials it's very appreciation of my.

This is really a general JSF question, not specific to Trinidad.

You are quite right to be worried about the use of "session". It works
fine for simple demo and tutorial applications, but applications with
lots of users do have to be worried about session-scope usage.

Unfortunately there isn't an easy answer. This subject could easily fill
a couple of chapters in a good JSF textbook - but as far as I know, no
JSF textbook has yet written about this subject.

The best solution is to just use request-scope for everything. However
in practice this can be very inconvenient to do.

There are a number of libraries that provide a "conversation" scope for
beans, which is somewhere in between "request" and "session" scope. In
other words, it works like session-scope, but makes it easier to remove
objects from the session when they are no longer needed. You might like
to look at:
 * Myfaces Orchestra
 * Trinidad "page flow"
 * Seam
 * Spring WebFlow

The Myfaces Orchestra site has an overview of what "conversation" scope
is, and what the difference is between the above implementations.

Regards,
Simon
-- 
-- Emails in "mixed" posting style will be ignored
-- (http://en.wikipedia.org/wiki/Posting_style)