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)

Reply via email to