ArcSDE and Commandline

4 messages Options
Embed this post
Permalink
jericks

ArcSDE and Commandline

Reply Threaded More More options
Print post
Permalink
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
Jody Garnett-2

Re: ArcSDE and Commandline

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Gabriel Roldan

Re: ArcSDE and Commandline

Reply Threaded More More options
Print post
Permalink
In reply to this post by jericks
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.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Gabriel Roldan

Re: ArcSDE and Commandline

Reply Threaded More More options
Print post
Permalink
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.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users