Thinking about that; I don't see a problem but kind of wish the shutdown was a 
bit more fine grained then that (ie datastore dispose cleaning up everything it 
is responsible for).

I do like the idea of having the shutdown hook and us using it to catch leaks.

Jody


On 14/05/2010, at 2:07 AM, Andrea Aime wrote:

> Hi,
> looking into why GeoServer leaks permgen memory on application
> redeploy in web containers I've found a number of problems in
> Geotools, mostly related to referencing and coverages: referencing
> keeps threads open and uses thread locals, the coverages subsystem
> registers operations and similar objects in the global JAI registries,
> which might be loaded along with the web container and thus
> keep references from long lived classes to the ones that should
> be dropped when the web application is undeployed.
> 
> I rolled out a few cleanup methods here and there but the approach
> is unsatisfactory.
> 
> What I would like to have is a GeoTools.shutdown() method that
> the client code can call to properly shut down all of the threads
> and thread locals and factories alike.
> 
> Since GeoTools.shutdown() cannot possibly know about all that
> needs to be done, I would also like to introduce a ShutdownListener
> interface, so that library and plugin code can add a lister and
> be informed that the shutdown is ongoing, and thus perform
> the necessary cleanups.
> 
> What do you think?
> 
> Cheers
> Andrea
> 
> -- 
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel


------------------------------------------------------------------------------

_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to