[jboss-user] [JBoss Seam] - Scope and Best Practices

chubby do-not-reply at jboss.com
Sun Apr 15 17:20:46 EDT 2007


Hello,

I'm very new to Seam and have been searching around the documentation and forums for some guidelines and best practices with regard to component scope.

The documentation mentions in several places that SESSION scope is frowned upon and/or used sparingly.  Yet, nearly all the examples use it, especially those dealing with the DataModel.

I can see how its not scalable to keep a large data model in memory for the duration of a user's session, but it seems equally non-scalable to query the database each time the user interacts with the page it supports.

I've experimented with long running conversations, etc, but then I have to make sure I end the conversation somehow when the user navigates away from the page.   

I guess before I get myself too contorted trying to figure out the best way to do something, I thought I'd ask the users how they use Scope.  When do  you use SESSION and when do you use CONVERSATION?  Do you use long running or the temporary conversations?  If long running, how to handle the user jumping to another page via a link or bookmark?

Also, if you have a page with a table for example that supports paging, what scope do you use?

Thanks in advance for your help,
Mark

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037399#4037399

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037399



More information about the jboss-user mailing list