commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vince Bonfanti <>
Subject Re: [vfs] LRUFilesCache safe for production use? Google App Engine/Java plug-in
Date Tue, 26 May 2009 11:14:17 GMT
My code will always run within a servlet, so I can close() the filesystem
when the servlet is destroyed. In this case, I should be OK using


On Tue, May 26, 2009 at 2:28 AM, Mario Ivankovits <> wrote:

> Hi!
> > 1. Is the LRUFilesCache safe for production use? GAE/J won't allow using
> > the default SoftRefFilesCache because it doesn't allow background
> threads.
> > I 've found a few really old messages saying things like
> "SoftRefFilesCache
> > is the only implementation suitable for production use" and "other file
> > cache implementation might cause resouce leaks", etc.
> Yes, these messages are still true. Sad to say that, but I realized that
> too late and planned to fix this, which is not that easy.
> Using any thing else than the SoftRefFilesChache will introduce memory
> leaks as the file-system object will not be discarded. You have to call
> close() on the filesystem, or even better call close on the
> DefaultFileSystemManager at all and do not use the VFS.getManager()
> singleton approach.
> That will also ensure that each and every resource used by the underlaying
> libraries are closed then too.
> Ciao,
> Mario

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message