cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Russell <p...@luminas.co.uk>
Subject Re: [C2] [Patch] Beginnings of component optimisation.
Date Tue, 28 Nov 2000 13:21:23 GMT
On Tue, Nov 28, 2000 at 03:48:44AM -0800, Giacomo Pati wrote:
> > There's a *lot* more to do for this (like making Poolable
> > objects return to their pools, for a start!), so all help is
> > appreciated :)
> This is not a problem with the sitemap components (Generator,
> Transformer, Serializer, Reader, Action, Selector and Matcher) because
> the sitemap engine takes care of that. It uses a 'finally' clause and
> uses a ComponentHolder class to take care of the component itself to
> have a uniform access handling to the component. But for the general
> components (like Store, image encoders, ...) this is. Someone posted
> some thought about Weak- and PhantomReference (or alike) but that seams
> not to be a walkable way.

Yep. It was me. Sadly, from what I can tell, it can't work -
none of the references give us that 'second chance' to recover
components before they are finalized. In theory, I belive it's
possible to do it using in the components finalizer, but it's
semantically dubious, and not a terribly 'pretty' solution to
the problem.

The spec says:

  "The finalize method may take any action, including making
   this object available again to other threads"

buy it also says:

  "The finalize method is never invoked more than once by a
   Java virtual machine for any given object."

Hazy. Anyone got any more thoughts about this?

-- 
Paul Russell                               <paul@luminas.co.uk>
Technical Director,                   http://www.luminas.co.uk
Luminas Ltd.

Mime
View raw message