> One approach is to store this data transiently in an ASO.

http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html

"With an ASO, the value is automatically stored outside the page; with
the default storage strategy, it is stored in the session. "

Unless you've built a different ASO storage strategy, your value is
going into the session and a session timeout will lose that value as
well.

My advice, build your app defensively. Don't depend on objects being
available if they are being pulled from the session, or even the
database for that matter. Understand what it means if a session times
out at every step of your workflow so you can do the right thing when
the object isn't there. Build tests that hit those pages with no
session to verify the behavior.

Good luck!
Josh

On Thu, Apr 10, 2008 at 3:55 AM, Peter Stavrinides
<[EMAIL PROTECTED]> wrote:
> Hi Stephane
>
> One approach is to store this data transiently in an ASO. (This data object
> needs to be serializable though, but using soft references works great). In
> your getter method be sure to check if its null and if so reinitialize
> it)... Inject the ASO in your pages and never worry about data activation in
> pages. This is the real value of IoC. However, bear in mind when using
> persisted data if it becomes large, it gets expensive to carry around in a
> high volume application, so you loose scalability.
>
>
>
> Stephane Decleire wrote:
> > Hi,
> >
> > I would like to know how do you handle session timeout with T5 or if there
> is a "design pattern" for this case.
> > When a session timeout occurs, a lot of pages won't work because of a lack
> of data (for example, normaly setted before returning the page). So i need
> to write a piece of code in the activation event of almost of my pages. In
> T4, i would have writen it in a parent page and would have subclassed all
> the pages from it. In T5 should i consider writing a mixin or something else
> ?
> >
> > Thanks in advance.
> >
> > Stephane
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to