Question on component caching / reuse

View: New views
1 Messages — Rating Filter:   Alert me  

Question on component caching / reuse

by Franck Routier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I have a question regarding components reuse or caching. After looking
at the code, I have the feeling that at the end of the rendering phase,
destroyCycle() is called on every component. This will null references
to children, views, ... So it seems to me that it would be difficult to
cache / reuse components (in a servlet session, for example for a part
of the UI like a toolbar).

So here is my question :

- does anyone cache components in his/her app (ie reuse the same
instance of a component on several request/response cycles) ?

- does anyone remember if this is supposed to be possible or not ? On
that matter, I have found a tread on the subject here :
http://osdir.com/ml/java.enhydra.barracuda.general/2002-11/msg00084.html
(but well, it was in 2002...)

- is this desirable ? If not why ?

- should the destroyCycle() be more more conservative, ie destroy only
references to stepChildren (not regular children) or tempViews (not
regular views) ? destroyCycle() is here to prevent memory leaks, so I
would rather be conservative with it, but maybe it could be enhanced to
promote components reuse...

Any thought on this ?

Franck






--

Barracuda mailing list

Barracuda@...

http://www.objectweb.org/wws/lists/projects/barracuda

LightInTheBox - Buy quality products at wholesale price