<?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: Race condition in job executor? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/race-condition-in-job-executor/m-p/123850#M87168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When a job is locked for XX seconds and not unlocked, the job-executor assumes something went terribly wrong while executing. THis has noting to do with transaction-timeout or millisToWait (as this is the poll-interval for acquiring jobs ready to execute).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the setting for lockTimeInMillis (protected int lockTimeInMillis = 5 * 60 * 1000&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; which defaults to 5 minutes. So if the first thread in the pool acquired the job and is executing it (lock-time is set) for longer than 5 minutes, the job-executor will use another thread to execute the job, effectively setting the lock-time etc. again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This results in the first thread, when it returns, to get an ActivitiConcurrentModificationException when the transaction is committed, rolling back the first job-execution. That's the way it's supposed to work. You should make sure the lockTimeInMillis is larger than the transaction-timeout to ensure the job being "marked as executed/failed" due to transaction-timeout before it's considered as "stuck"…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jul 2013 10:53:31 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2013-07-17T10:53:31Z</dc:date>
    <item>
      <title>Race condition in job executor?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/race-condition-in-job-executor/m-p/123849#M87167</link>
      <description>Hello all,We had the following case, an async and exclusive service task calling a cdi method. The job executor is configured to lock jobs for 5 mins so as the jboss server transaction timeout. It has been noticed that this cdi method, under heavy load, had its transaction timed out so nothing was u</description>
      <pubDate>Mon, 15 Jul 2013 19:36:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/race-condition-in-job-executor/m-p/123849#M87167</guid>
      <dc:creator>mandas</dc:creator>
      <dc:date>2013-07-15T19:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Race condition in job executor?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/race-condition-in-job-executor/m-p/123850#M87168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When a job is locked for XX seconds and not unlocked, the job-executor assumes something went terribly wrong while executing. THis has noting to do with transaction-timeout or millisToWait (as this is the poll-interval for acquiring jobs ready to execute).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the setting for lockTimeInMillis (protected int lockTimeInMillis = 5 * 60 * 1000&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; which defaults to 5 minutes. So if the first thread in the pool acquired the job and is executing it (lock-time is set) for longer than 5 minutes, the job-executor will use another thread to execute the job, effectively setting the lock-time etc. again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This results in the first thread, when it returns, to get an ActivitiConcurrentModificationException when the transaction is committed, rolling back the first job-execution. That's the way it's supposed to work. You should make sure the lockTimeInMillis is larger than the transaction-timeout to ensure the job being "marked as executed/failed" due to transaction-timeout before it's considered as "stuck"…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 10:53:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/race-condition-in-job-executor/m-p/123850#M87168</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-07-17T10:53:31Z</dc:date>
    </item>
  </channel>
</rss>

