I think whats "fools" most new users of Tapestry (including me!) is the ease 
that OGNL provides.

For example, we have a Tapestry page to create a User-account. This page creats 
a User Object and what we did was store an User instance in the .java and use 
ognl like:

ognl:user.username
ognl:user.firstName
ognl:user.lastName
Etc...

for the text fields on the page. This, as we all know by now, will cause the 
"strange timeout behaviour".

What new users need to made aware of is the implications of the page-pooling 
that Tapestry has. Before i understood that, i thougt that the page-pooling was 
just a feature of this black-box and left it at that. Now i know that because 
of this, i need to program my .java files differently.

Since then, we have had to come up with a way to store the User instances in an 
external cache and store an ID (to retrieve the right User instance) for the 
request.

I read somewhere on the list that Tapestry 4 has this feature (to store object 
states), can someone confirm this? And Tap 4 has this feature, i think it 
should be back-ported to Tap 3 because it a very usefull feature.

Regards,

Saqib

> -----Ursprüngliche Nachricht-----
> Von: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
> Gesendet: Wednesday, 20 July 2005 3:17 PM
> An: Tapestry users
> Betreff: Re: Strange timeout behavior
> 
> You are not making your properties abstract; you are 
> therefore having problems because user data is stored in 
> properties of pages (stored within the page pool), not within 
> the HttpSession as they should be.
> 
> When the pages are culled from the page pool, you lose your 
> server side data.
> 
> You MUST use abstract accessor methods and mark the 
> properties as persistent.  Only in this way will properties 
> be stored into the HttpSession.  This can be done in 3.0 
> using XML and in 4.0 using annotations (or XML).
> 
> The fact that your application works at all in development is 
> a feature.  It will neither scale to more users on a single 
> server, or work in properly in a cluster.
> 
> Not a single example piece of code in TiA or in the Quick 
> Start tutorial tries to do such an "end run" around Tapestry. 
>  Do so at your own peril.
> 
> The only times I don't use abstract properties is when I want 
> to cache an expensive object that is not client- or request- 
> dependent.  For example, I may cache an IPropertySelection 
> model, lazily creating it as necessary.
> 
> 
> On 7/18/05, Edward Scanzano <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > 
> > I have a situtation where my application runs normally as I click 
> > through it. Parameters are being passed to components 
> correctly, etc. 
> > However, if I let the application sit idle for a short time 
> (maybe 10 
> > minutes, not sure of the exact time) then when I click on 
> those same 
> > links I get exceptions that are caused by component 
> parameters being 
> > null. The session has not timed out yet.
> > 
> > What is causing this?
> > 
> > Thanks
> > E
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > 
> > 
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant Creator, 
> Jakarta Tapestry Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support and 
> project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

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

Reply via email to