<?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: Configuring Job executor thread pool in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182869#M135999</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;On further testing (and adding additional logs in activiti source to print persistent object state - no other changes), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found everytime Optimistic locking exception is throw, I see exception message: Unable to instantiate class (JavaDelegate)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below are logs for one of the MessageEntity (I can provide full logs, if required)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2014-06-12 12:35:11,266 pool-2-thread-3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TestWrapper INFO&amp;nbsp; - TestWrapper called, processInstanceId=849d828b-f24f-11e3-b0ab-081196804620, processDefinitionId=myProcess3:33:840fc167-f24f-11e3-b0ab-081196804620, time variable=8426913569603&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2014-06-12 12:35:15,036&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread-2 org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable WARN&amp;nbsp; - Optimistic locking exception during job acquisition. If you have multiple job executors running against the same database, this exception means that this thread tried to acquire a job, which already was acquired by another job executor acquisition thread.This is expected behavior in a clustered environment. You can ignore this message if you indeed have multiple job executor acquisition threads running against the same database. Exception message: MessageEntity[84a4d5d3-f24f-11e3-b0ab-081196804620], OBJECT STATE: {exceptionMessage=couldn't instantiate class TestWrapper, lockExpirationTime=Thu Jun 12 12:40:14 EDT 2014, lockOwner=d369623d-184a-4465-93a1-05f82183ed79, exceptionByteArrayId=878dc4eb-f24f-11e3-841d-0021283e0734, duedate=null, retries=2} was updated by another transaction concurrently&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception in thread "pool-2-thread-3" org.activiti.engine.ActivitiOptimisticLockingException: MessageEntity[84a4d5d3-f24f-11e3-b0ab-081196804620], OBJECT STATE: {exceptionMessage=null, lockExpirationTime=Thu Jun 12 12:40:10 EDT 2014, lockOwner=d369623d-184a-4465-93a1-05f82183ed79, duedate=null, retries=3} was updated by another transaction concurrently&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;—-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this error "couldn't instantiate class TestWrapper" — anyway related to optimistic locking exception?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also why do I see class loading error while this class is definitely called earlier (Logs above - see time stamp)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2014 17:05:00 GMT</pubDate>
    <dc:creator>spark2</dc:creator>
    <dc:date>2014-06-12T17:05:00Z</dc:date>
    <item>
      <title>Configuring Job executor thread pool</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182865#M135995</link>
      <description>I see below variables in DefaultJobExecutor&amp;nbsp; protected int queueSize = 3;&amp;nbsp; protected int corePoolSize = 3;&amp;nbsp; private int maxPoolSize = 10;‍‍‍‍‍I am performing load testing on basic workflow (Start -&amp;gt; Java Service Task -&amp;gt; End) The delegate class just prints System.outIt runs fine for 10-15 threa</description>
      <pubDate>Thu, 05 Jun 2014 21:52:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182865#M135995</guid>
      <dc:creator>spark2</dc:creator>
      <dc:date>2014-06-05T21:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Job executor thread pool</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182866#M135996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can inject your own DefaultJobExecutor bean in the jobExecutor property of the ProcessEngineConfiguration. And then you can configure these values. To fully customise the job executor behaviour you can use your own JobExecutor implementation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 12:40:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182866#M135996</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-06-06T12:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Job executor thread pool</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182867#M135997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have requirement for multiple instances of a workflow having async task to run concurrently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The service task code is non-transactional (Example: Call external web service to book ticket) and cannot be rolled back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created basic workflow test case to test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Start -&amp;gt; Java Service Task -&amp;gt; End&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;process id="myProcess3" name="My process3" isExecutable="true"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="startevent1" name="Start"&amp;gt;&amp;lt;/startEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serviceTask id="servicetask1" name="Service Task" activiti:async="true" activiti:exclusive="false" activiti:class="TestWrapper"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:field name="testField1"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:expression&amp;gt;testField1&amp;lt;/activiti:expression&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/activiti:field&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/serviceTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="endevent1" name="End"&amp;gt;&amp;lt;/endEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="endevent1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/process&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TestWrapper just prints variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;logger.info("TestWrapper called, time="&amp;nbsp; +execution.getVariable("time"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am starting 50 threads - each launching this workflow to run concurrently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting below exception all the time&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Increasing job executor thread pool size and database connection pool just delays this exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using activiti:exclusive="true" - still this error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception in thread "pool-2-thread-5" org.activiti.engine.ActivitiOptimisticLockingException: MessageEntity[802344] was updated by another transaction concurrently&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.db.DbSqlSession$DeletePersistentObjectOperation.execute(DbSqlSession.java:239)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:668)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:462)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:168)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:115)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:70)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.Thread.run(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case as task is non transactional there is no way to roll back. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on forum messages, I thought this error may occur if multiple process engine (and hence multiple job executors) running and each trying to update the job. For this test, there is only one process engine instance running. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 19:40:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182867#M135997</guid>
      <dc:creator>spark2</dc:creator>
      <dc:date>2014-06-06T19:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Job executor thread pool</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182868#M135998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Update - Using Strong UUID doesn't change the result. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand exception will roll back activiti database entries but the main issue is non transactional business logic which cannot be roll back.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using activiti 5.12.x - I couldn't find anything in release notes that address this. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just wondering if anyone else have this issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 22:18:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182868#M135998</guid>
      <dc:creator>spark2</dc:creator>
      <dc:date>2014-06-11T22:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Job executor thread pool</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182869#M135999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;On further testing (and adding additional logs in activiti source to print persistent object state - no other changes), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found everytime Optimistic locking exception is throw, I see exception message: Unable to instantiate class (JavaDelegate)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below are logs for one of the MessageEntity (I can provide full logs, if required)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2014-06-12 12:35:11,266 pool-2-thread-3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TestWrapper INFO&amp;nbsp; - TestWrapper called, processInstanceId=849d828b-f24f-11e3-b0ab-081196804620, processDefinitionId=myProcess3:33:840fc167-f24f-11e3-b0ab-081196804620, time variable=8426913569603&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2014-06-12 12:35:15,036&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread-2 org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable WARN&amp;nbsp; - Optimistic locking exception during job acquisition. If you have multiple job executors running against the same database, this exception means that this thread tried to acquire a job, which already was acquired by another job executor acquisition thread.This is expected behavior in a clustered environment. You can ignore this message if you indeed have multiple job executor acquisition threads running against the same database. Exception message: MessageEntity[84a4d5d3-f24f-11e3-b0ab-081196804620], OBJECT STATE: {exceptionMessage=couldn't instantiate class TestWrapper, lockExpirationTime=Thu Jun 12 12:40:14 EDT 2014, lockOwner=d369623d-184a-4465-93a1-05f82183ed79, exceptionByteArrayId=878dc4eb-f24f-11e3-841d-0021283e0734, duedate=null, retries=2} was updated by another transaction concurrently&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception in thread "pool-2-thread-3" org.activiti.engine.ActivitiOptimisticLockingException: MessageEntity[84a4d5d3-f24f-11e3-b0ab-081196804620], OBJECT STATE: {exceptionMessage=null, lockExpirationTime=Thu Jun 12 12:40:10 EDT 2014, lockOwner=d369623d-184a-4465-93a1-05f82183ed79, duedate=null, retries=3} was updated by another transaction concurrently&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;—-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this error "couldn't instantiate class TestWrapper" — anyway related to optimistic locking exception?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also why do I see class loading error while this class is definitely called earlier (Logs above - see time stamp)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 17:05:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182869#M135999</guid>
      <dc:creator>spark2</dc:creator>
      <dc:date>2014-06-12T17:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring Job executor thread pool</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182870#M136000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;gt; Is this error "couldn't instantiate class TestWrapper" — anyway related to optimistic locking exception?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, it is not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have TestWrapper like that on your classpath (no packages?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesnt make sense. Could you zip up your test project so we can try it out?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 11:13:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/configuring-job-executor-thread-pool/m-p/182870#M136000</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-06-17T11:13:23Z</dc:date>
    </item>
  </channel>
</rss>

