Sorry, but I read this message only now.
On 20.02.2006 07:46, David Crossley wrote:
Tim Williams wrote:
In forrest we've got an input module that currently has it's own
simple hashmap-caching. The assumption is that the right thing to do
is move away from our homegrown-cache to use the cocoon store
(TRANSIENT_STORE).
I presume that you are referring to the Locationmap.
The Cocoon LinkRewriterTransformer has a similar issue
http://issues.apache.org/jira/browse/COCOON-1574
"Memory Leak with XMLFileModule"
It has comments about needing to use the Cocoon cache.
Perhaps Ralph and Jörg can help.
On the one hand it is simply a matter of avoiding copy & paste or
reimplementations of concerns in different ways (of which some might be
buggy like with XMLFileModule). On the other hand the Cocoon cache is
well tested and works well - while the XMLFileModule cache does
obviously not. ...
Do I need to do anything on dispose() to explicitly clean out my
stored items or assume it'll push them out if it needs to?
... The Cocoon core especially moves objects from transient store to
persistent store if the transient store is full - or to nirvana if they
are not serializable. At least the store does not grow endlessly and
does not lead to OutOfMemoryError.
So yes, switching to Cocoon cache is preferable to homegrown caches.
For the Cocoon issue itself: Few days ago Ralph mentioned possible
progress "in the next couple of days". Unfortunately, it seems he had
not the time to make it, so it is not in Cocoon 2.1.9. But from other
mails on the list I assume there will be a new release in the near
future (be it 2.1.9.1 or 2.1.10) anyway. Hopefully including the fix
then. Any comments on this, Ralph?
Regards
Jörg