Hi Kalle,
> How does the page pool work - are less used pages removed from
> the pool only when other pages push them out or is the cache cleared
> periodically?

Page pooling is done separately for each page (and localization of the page). 
I.e. If you have a Page MyPage for locale de and for en that makes two 
instances of MyPage in the pool. When a page is requested Tapestry looks in the 
page pool, if that page is readily available. If none is immediately available, 
it creates one. This is done up to an amount of pages that is configured with 
"tapestry.page-pool.soft-limit". If that number is reached for a particular 
page (combination of page and locale) it will wait for an amount of time that 
can be configured with "tapestry.page-pool.soft-wait" If no page becomes 
available within that time, Tapestry will create a new instance. This is done 
until an absolute maximum of pages (all pages together) is reached. This 
absolute maximum is configured with "tapestry.page-pool.hard-limit". If that is 
reached, request will fail. Pages that are in the pool and are not used for an 
amount of time, will be deleted from the pool. This can be configured with 
"tapestry.page-pool.active-window". Look here for details: 
http://tapestry.apache.org/tapestry5.1/guide/conf.html

> Are there any potential issues using static attributes instead?
If the attribute can be calculated already at class-loading time, there is no 
issue. Except if calculating that attribute is time consuming or may fail. That 
would slow down or even block loading of the page class.

Regards, nillehammer

==


----- original Nachricht --------

Betreff: Difference between @Retain and static attributes?
Gesendet: Mi, 24. Jun 2009
Von: Kalle Korhonen<kalle.o.korho...@gmail.com>

> I was using @Retain for some fields that only needed to be initialized
> once on a page. However, I see that they are reset after some time has
> passed. How does the page pool work - are less used pages removed from
> the pool only when other pages push them out or is the cache cleared
> periodically? Are there any potential issues using static attributes
> instead?
> 
> Kalle
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 

--- original Nachricht Ende ----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to