I'm not a persistence expert - so you'll probably want to ask Gavin when he gets
back. In general I try to be careful about session-level data. Sessions generally live a
long time, and session data can easily go stale. (a search result, or something)
You'll often find that the best strategy is to reload the data from the database on
each request to make sure you have uptodate objects. You take the object into a
conversation for the purpose of some sort of multi-screen editing transaction.
So, what you might consider doing for the customer is to store the id in the session and
use a seam wrapper object to retrieve actual customer as needed. You won't have to
worry about a LIE because your object won't detach from the PC until the end of the
request. And, you'll always have the most current data. If you are worried about
efficiency, you can configure your second level cache to deal with reads.
But, as I said, I'm no persistence guru.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996459#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...