|
Hi, I recently had bad experiences while using t:saveState with client-side state, using Myfaces + Trinidad. In this case Trinidad uses a numeric token in the page, while real state contents are saved on the server without any serialization. Although not explicitely set, I guess that SERIALIZE_STATE_IN_SESSION was set to false, since I got exactly the behavior described here. The problem occurs when objects are saved/restored and modified across multiple requests. In such cases, the object remains the same unless recreated. This means that any modification will be retrieved when refreshing the page or retrieving an older one by push-back. This in turn might lead to inconsistencies against other saved objects. The symptom is that all works fine while navigating forwards, while disasters appear while refreshing or pushing back to old views. The simple workaround is to clone any saved object upon its setter call in the bean - which occurs first during restoreView. This approach ensures that future modifications will not be retrofitted to older views. The same holds true for any transient component, such as bound components or linked beans: clean all them upon the first setter call of the saved object, like the constructor would do. Hope this helps, -- Renzo simon wrote: On Wed, 2008-05-21 at 10:02 -0700, hbMailingList wrote:Hello, I was reading the performance wiki page, and it is suggesting that SERIALIZE_STATE_IN_SESSION should be set to false. |
- what is SERIALIZE_STATE_IN_SESSION hbMailingList
- Re: what is SERIALIZE_STATE_IN_SESSION simon
- Re: what is SERIALIZE_STATE_IN_SESSION Renzo Tomaselli
- Re: what is SERIALIZE_STATE_IN_SESSION Scott O'Bryan
- [Tomahawk][Myfaces] how to prevent scatte... Renzo Tomaselli
- Re: [Tomahawk][Myfaces] how to preve... Scott O'Bryan
- Re: [Tomahawk][Myfaces] how to p... Renzo Tomaselli
- Re: what is SERIALIZE_STATE_IN_SESSION hbMailingList

