Yes, I think so.
-----Original Message----- From: Vince Bonfanti [mailto:vbonfa...@gmail.com] Sent: Tuesday, May 26, 2009 1:14 PM To: Commons Developers List Subject: Re: [vfs] LRUFilesCache safe for production use? Google App Engine/Java plug-in 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 LRUFilesCache? Thanks, Vince On Tue, May 26, 2009 at 2:28 AM, Mario Ivankovits <ma...@ops.co.at> 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org