Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Andrea Aime
christian.muel...@nvoe.at ha scritto: > @Andrea > > Hi Andrea, sorry to make some noise here. I misinterpreted the situation > (bad coffee in the morning). I thought the shutdown method is primary > intended for geoserver, obviously it is the other way around, making > geotools ready for web ap

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread christian . mueller
@Andrea Hi Andrea, sorry to make some noise here. I misinterpreted the situation (bad coffee in the morning). I thought the shutdown method is primary intended for geoserver, obviously it is the other way around, making geotools ready for web apps. This is a 100% +1 and I hope we can end t

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Andrea Aime
Simone Giannecchini ha scritto: > Ciao a tutti, > I guess that aaime wants clean up whatever is registered into generic > registries, so jai operations and imageio reader, writers, instreams > and outstreams. I am going to check aaime's patch afterwards. > > Anyway, andrea, (besides suggesting to

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Simone Giannecchini
Ciao a tutti, I guess that aaime wants clean up whatever is registered into generic registries, so jai operations and imageio reader, writers, instreams and outstreams. I am going to check aaime's patch afterwards. Anyway, andrea, (besides suggesting to calm down :) ) I wanted to ask you what we a

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Michael Bedward
On 14 May 2010 18:25, Andrea Aime wrote: > > On GS devel there is a patch I provided that uses exactly that > (attached, it's a bit messy but you should see the JAI cleanup >  spots) > Indeed. That's great - thanks very much Andrea ! Michael --

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Andrea Aime
Jody Garnett ha scritto: > Cool - I am in favour of that. > > Is there any way we could "register" some activites for this hook? I > expect that an OSGi context could also make use of them for a clean > exit. > > For OSGi it is willing to startup / shutdown a module - we already > have GeoTools i

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Andrea Aime
Andrea Aime ha scritto: > Well, the fact that it works just fine in desktop apps and does not > work as fine in GeoServer would make me think otherwise. > And you're well aware that there are other issues in J2EE in general. > So much for being GeoServer only. Taking a deep breath and trying a cal

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Jody Garnett
Cool - I am in favour of that. Is there any way we could "register" some activites for this hook? I expect that an OSGi context could also make use of them for a clean exit. For OSGi it is willing to startup / shutdown a module - we already have GeoTools init so cleanup could be the spiritual o

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Jody Garnett
On 14/05/2010, at 5:35 PM, christian.muel...@nvoe.at wrote: > Reclamation :-) > > First, I use geotools also in an EJB Container,having its own life cicle and > class loader. Second, I use geotools in a Java Applet, yet another life cyle. > The Java VM is started only once and there can be many

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Andrea Aime
Jody Garnett ha scritto: > So a GeoTools.cleanup() then :-) > > Basically I would love to some how partition or set a checkpoint or > something and cleanup; and keep on going ... Ideally I would love to > do this on a Map by Map basis in uDig so when a Map is closed I can > "flush" out and geotool

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Andrea Aime
Michael Bedward ha scritto: I'm following this with interest and am +0 about it so far because I don't do web apps. Regarding JAI, tthere is a method to unregister an operation descriptor but I've never tried it. Simone: have you any experience with this ? On GS devel there is a patch I provi

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Andrea Aime
christian.muel...@nvoe.at ha scritto: > Reclamation :-) > > First, I use geotools also in an EJB Container,having its own life cicle > and class loader. > > Second, I use geotools in a Java Applet, yet another life cyle. The Java > VM is started only once and there can be many different applets

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Michael Bedward
I'm following this with interest and am +0 about it so far because I don't do web apps. Regarding JAI, tthere is a method to unregister an operation descriptor but I've never tried it. Simone: have you any experience with this ? Michael --

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread Jody Garnett
So a GeoTools.cleanup() then :-) Basically I would love to some how partition or set a checkpoint or something and cleanup; and keep on going ... Ideally I would love to do this on a Map by Map basis in uDig so when a Map is closed I can "flush" out and geotools resources it was tracking. We *d

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-14 Thread christian . mueller
Reclamation :-) First, I use geotools also in an EJB Container,having its own life cicle and class loader. Second, I use geotools in a Java Applet, yet another life cyle. The Java VM is started only once and there can be many different applets. The only thing I want to say is that we should

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-13 Thread Andrea Aime
christian.muel...@nvoe.at ha scritto: > +1 for the concept. > +1 for the name GeoTools.undeploy() > > -1 onWebApplicationUnload(), geotools itself has nothing to do with > webapps, > why should UDIG call onWebApplicationUnload() ?? It should not. That method is specifically designed for J2EE cle

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-13 Thread christian . mueller
+1 for the concept. +1 for the name GeoTools.undeploy() -1 onWebApplicationUnload(), geotools itself has nothing to do with webapps, why should UDIG call onWebApplicationUnload() ?? IMHO it would make sense to have a GeoTools.redploy(). To give an example: The imagemosaic-jdbc module could reread

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-13 Thread Andrea Aime
Jody Garnett ha scritto: > 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. H

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-13 Thread Jody Garnett
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, An

Re: [Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-13 Thread Justin Deoliveira
Sounds like a great idea to me. On 10-05-13 10: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

[Geotools-devel] Adding a GeoTools.shutdown() method

2010-05-13 Thread Andrea Aime
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 obj