<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java SOE and multithreading in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590076#M15929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;en,Sorry for that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Apr 2014 04:19:14 GMT</pubDate>
    <dc:creator>ChunjieXu</dc:creator>
    <dc:date>2014-04-12T04:19:14Z</dc:date>
    <item>
      <title>Java SOE and multithreading</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590072#M15925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am developing an SOE using Java for AGS 10.2. For some interactions with the operations of the SOE a set of database queries are required that may take a few minutes. In order to speed things up, I have developed a little caching component that dumps the results of these queries into a file on the HDD.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I am struggling now with: this caching component should run in the background as a maintenance task. Now, whenever this task runs (and it runs for several minutes) the interaction with the operations of the SOE is not possible any longer. It seems like it is locked by the background task. It even does not reach the "handleRESTRequest(...)" method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I could not find any documentation regarding locking and threading in SOE development. Is this intended behaviour? And if so, is there any workaround you could think of? I just don't want the service to block whenever my cache is updating.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Matthes&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 12:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590072#M15925</guid>
      <dc:creator>MatthesRieke</dc:creator>
      <dc:date>2014-04-10T12:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Java SOE and multithreading</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590073#M15926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I also increase the memory heap as suggested in the document, the problem still exist.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 07:42:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590073#M15926</guid>
      <dc:creator>ChunjieXu</dc:creator>
      <dc:date>2014-04-11T07:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Java SOE and multithreading</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590074#M15927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After the error, there are two new directory "install", "ServerObjectExt" and a jar file in the project folder, but the .soe file is missing,as the flowing picture shows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ATTACH=CONFIG]33037[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 07:46:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590074#M15927</guid>
      <dc:creator>ChunjieXu</dc:creator>
      <dc:date>2014-04-11T07:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Java SOE and multithreading</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590075#M15928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;wrong thread, I guess?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 07:49:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590075#M15928</guid>
      <dc:creator>MatthesRieke</dc:creator>
      <dc:date>2014-04-11T07:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Java SOE and multithreading</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590076#M15929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;en,Sorry for that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 04:19:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590076#M15929</guid>
      <dc:creator>ChunjieXu</dc:creator>
      <dc:date>2014-04-12T04:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Java SOE and multithreading</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590077#M15930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For your quesitons, is it possible to use 2 SOEs? one for caching and the other to do the normal task?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 04:26:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590077#M15930</guid>
      <dc:creator>ChunjieXu</dc:creator>
      <dc:date>2014-04-12T04:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Java SOE and multithreading</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590078#M15931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;An SOE is associated with a map service.&amp;nbsp; Map services are configured to be high isolation or low isolation and the minimum and maximum number of instances are also specified.&amp;nbsp; How is yours configured?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an SOE which creates a background thread when IObjectConstruct.Construct is called and it works fine.&amp;nbsp; The thread takes some time but it does not use ArcObjects.&amp;nbsp; ArcObjects are COM STA and do not deal with multi-threading well.&amp;nbsp; ESRI refers to the model as "threads in isolation".&amp;nbsp; I have seen very little multi-threaded ArcObject code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code is written in .NET but my &amp;gt;guess&amp;lt; is that this point is probably not relevant.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My assumption is that you have exposed a function via the SOE and are calling it.&amp;nbsp; That function is taking minutes to complete and you are unable to make other REST calls while that function is running.&amp;nbsp; This could relate to how you configured the map service (hence my first question).&amp;nbsp; Is the long running operation occurring on a background thread or on the thread on which the SOE is waiting for a response?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An SOE extends/exposes HTTP actions.&amp;nbsp; HTTP actions are not intended to be long running and typically have timeouts associated with them.&amp;nbsp; If you are making a REST call which takes several minutes to complete then I think that you are doing the wrong thing.&amp;nbsp; One alternative is to use something like GeoProcessing -or- do something like have your request issue a ticket as a response which the client can then use to check the progress status.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 10:41:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/java-soe-and-multithreading/m-p/590078#M15931</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2014-04-12T10:41:34Z</dc:date>
    </item>
  </channel>
</rss>

