From: jericks <je...@co...> - 2009-09-17 19:43:21
|
Hello, I have written some command line utilities using geotools and I noticed that when I use them with ArcSDE DataStores they don't exit (without an explicit call to System.exit(0)), even though I am closing the DataStore and the FeatureIterator in try/finally blocks. I suspect it's related to threading and I wonder if it's a bug. Thanks, Jared -- View this message in context: http://n2.nabble.com/ArcSDE-and-Commandline-tp3664894p3664894.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. |
From: Jody G. <jod...@gm...> - 2009-09-19 07:40:20
|
Hi Jared; I am used to AWT applications not exiting without a System.exit(0). Can you check that you call the "dispose()" method on ArcSDE DataStore that should be called to stop any threads? I can see the method clean up connections: public void dispose() { LOGGER.fine("Disposing " + connectionPool); this.typeInfoCache.dispose(); if (!connectionPool.isClosed()) { this.connectionPool.close(); } LOGGER.fine("Session pool disposed"); } But if there is a thread pool it is using that needs to be cleaned up we should report it as a new jira issue. Cheers, Jody On 18/09/2009, at 5:43 AM, jericks wrote: > > Hello, > > I have written some command line utilities using geotools and I > noticed that > when I use them with ArcSDE DataStores they don't exit (without an > explicit > call to System.exit(0)), even though I am closing the DataStore and > the > FeatureIterator in try/finally blocks. I suspect it's related to > threading > and I wonder if it's a bug. > > Thanks, > Jared > -- > View this message in context: http://n2.nabble.com/ArcSDE-and-Commandline-tp3664894p3664894.html > Sent from the geotools-gt2-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
From: Gabriel R. <gr...@op...> - 2009-09-19 18:45:12
|
Hi Jared, it certainly looks like a bug in not finishing the ExecutorService when a connection is destroyed... Calling DataStore.dispose() on your finally block should do the trick I think, though it's also possible that some remain live until finalize() is called on Session, may need to check. Can you create a jira issue for the data-arcsde component and assign to me? you can do that here <http://jira.codehaus.org/browse/GEOT>. As a bonus you'll get notified by Jira when the issue is fixed (which I can do quickly). Cheers, Gabriel jericks wrote: > Hello, > > I have written some command line utilities using geotools and I noticed that > when I use them with ArcSDE DataStores they don't exit (without an explicit > call to System.exit(0)), even though I am closing the DataStore and the > FeatureIterator in try/finally blocks. I suspect it's related to threading > and I wonder if it's a bug. > > Thanks, > Jared -- Gabriel Roldan OpenGeo - http://opengeo.org Expert service straight from the developers. |
From: Gabriel R. <gr...@op...> - 2009-09-21 13:12:25
|
Hi, so I created the issue for you: <http://jira.codehaus.org/browse/GEOT-2723> I think I can give it a kick over the week. Cheers, Gabriel Gabriel Roldan wrote: > Hi Jared, > > it certainly looks like a bug in not finishing the ExecutorService when > a connection is destroyed... Calling DataStore.dispose() on your finally > block should do the trick I think, though it's also possible that some > remain live until finalize() is called on Session, may need to check. > > Can you create a jira issue for the data-arcsde component and assign to > me? you can do that here <http://jira.codehaus.org/browse/GEOT>. As a > bonus you'll get notified by Jira when the issue is fixed (which I can > do quickly). > > Cheers, > Gabriel > > jericks wrote: >> Hello, >> >> I have written some command line utilities using geotools and I noticed that >> when I use them with ArcSDE DataStores they don't exit (without an explicit >> call to System.exit(0)), even though I am closing the DataStore and the >> FeatureIterator in try/finally blocks. I suspect it's related to threading >> and I wonder if it's a bug. >> >> Thanks, >> Jared > > -- Gabriel Roldan OpenGeo - http://opengeo.org Expert service straight from the developers. |