<?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: activiti &amp; thread safety in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87908#M59610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm, you might be right. Didn't think in that direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem that the uuid generator solves, is that under high load, no free connections can be found for fetching new id blocks that the engine uses to assign ids to entities. it's a long shot, but maybe the exception you see is indeed related to that….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep me posted!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2012 13:15:22 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2012-10-29T13:15:22Z</dc:date>
    <item>
      <title>activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87903#M59605</link>
      <description>Hi guys, we are using activiti embedded in our product and have it configured using Spring like&amp;nbsp; &amp;lt;bean id="activiti.dataSource.dbcp" class="org.apache.commons.dbcp.BasicDataSource"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="driverClassName" ref="activiti.jdbc.driver" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="url" ref="activiti</description>
      <pubDate>Wed, 24 Oct 2012 21:30:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87903#M59605</guid>
      <dc:creator>christoph_retti</dc:creator>
      <dc:date>2012-10-24T21:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87904#M59606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, Activiti is thread safe. The way I read your exception, is that there is something wrong at the database level. What isolation level is your db running on? Does the db uses table locks instead of row locks? Because I've seen that exception before, but only with H2 database, which uses table locks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 08:16:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87904#M59606</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-10-25T08:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87905#M59607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am using SQL Server 2008 with default settings and this are&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;CODE&gt;isolation level = read committed&lt;/CODE&gt;&lt;SPAN&gt;which is passed back by executing the t-sql command&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; DBCC USEROPTIONS;&lt;/CODE&gt;&lt;SPAN&gt;Accoring to&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://msdn.microsoft.com/de-at/library/ms189122(v=sql.105).aspx" rel="nofollow noopener noreferrer"&gt;http://msdn.microsoft.com/de-at/library/ms189122(v=sql.105).aspx&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL Server 2008 does not use table locks - only when running batch updates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Our own application is not affected in any way by locks, so I was wondering if you use special statements through the ibatis command you run?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 15:06:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87905#M59607</guid>
      <dc:creator>christoph_retti</dc:creator>
      <dc:date>2012-10-25T15:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87906#M59608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Those settings look fine. I'm also assuming a product like MSSQLserver doesn't use table locks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the exception bothers me. If you have read committed, and you have two transactions going to the same row, Activiti will use optimistic locking to throw an exception for one of them. But then you'd see an optimistic locking exception and not a deadlock.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you already read &lt;/SPAN&gt;&lt;A href="http://www.codinghorror.com/blog/2008/08/deadlocked.html" rel="nofollow noopener noreferrer"&gt;http://www.codinghorror.com/blog/2008/08/deadlocked.html&lt;/A&gt;&lt;SPAN&gt;? In particular, this statements:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm no DBA, but it seems to me the root of our problem is that the default SQL Server locking strategy is incredibly pessimistic out of the box:&lt;BR /&gt;&lt;BR /&gt;The database philosophically expects there will be many data conflicts; with multiple sessions all trying to change the same data at the same time and corruption will result. To avoid this, Locks are put in place to guard data integrity … there are a few instances though, when this pessimistic heavy lock design is more of a negative than a positive benefit, such as applications that have very heavy read activity with light writes.&lt;BR /&gt;Wow, very heavy read activity with light writes. What does that remind me of? Hmm. Oh yes, that damn website we're building. Fortunately, there is a mode in SQL Server 2005 designed for exactly this scenario: read committed snapshot:&lt;BR /&gt;&lt;BR /&gt;Snapshots rely on an entirely new data change tracking method … more than just a slight logical change, it requires the server to handle the data physically differently. Once this new data change tracking method is enabled, it creates a copy, or snapshot of every data change. By reading these snapshots rather than live data at times of contention, Shared Locks are no longer needed on reads, and overall database performance may increase.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;But one thing is for sure: don't synchronize the calls. That would be very bad for performance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 06:25:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87906#M59608</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-10-26T06:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87907#M59609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm … I have read a lot of articles now on this issue and also found that one should try out&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;lt;bean id="processEngineConfiguration" … &amp;gt;&lt;BR /&gt;…&lt;BR /&gt;&amp;lt;property name="idGenerator"&amp;gt;&lt;BR /&gt;&amp;lt;bean class="org.activiti.engine.impl.persistence.StrongUuidGenerator" /&amp;gt; &lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/bean&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you think, should I change the idGenerator os is this something already in place with activiti 5.10?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I will give it a try with READ COMMITED SNAPSHOT tomorrow, I will get you informed of the outcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks for the help!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 15:11:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87907#M59609</guid>
      <dc:creator>christoph_retti</dc:creator>
      <dc:date>2012-10-26T15:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87908#M59610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm, you might be right. Didn't think in that direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem that the uuid generator solves, is that under high load, no free connections can be found for fetching new id blocks that the engine uses to assign ids to entities. it's a long shot, but maybe the exception you see is indeed related to that….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep me posted!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 13:15:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87908#M59610</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-10-29T13:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87909#M59611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I gave it another try now and so I again removed the synchronization to be able to reproduce the error again which is&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;INFO : Starting queue process.cspstep &lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy&lt;BR /&gt;INFO: Processing resource UC2InvoiceProcess.Uc2InvoiceProcess.png&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy&lt;BR /&gt;INFO: Processing resource UC2InvoiceProcess.Uc2InvoiceProcess.png&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy&lt;BR /&gt;INFO: Processing resource UC2InvoiceProcess.bpmn20.xml&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy&lt;BR /&gt;INFO: Processing resource UC2InvoiceProcess.bpmn20.xml&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes&lt;BR /&gt;INFO: XMLSchema currently not supported as typeLanguage&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes&lt;BR /&gt;INFO: XPath currently not supported as expressionLanguage&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseProcessDefinitions&lt;BR /&gt;INFO: Process with id='Uc2InvoiceProcess' hasn't the attribute isExecutable set. Please maintain it, so you are compatible to future activiti versions.&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes&lt;BR /&gt;INFO: XMLSchema currently not supported as typeLanguage&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes&lt;BR /&gt;INFO: XPath currently not supported as expressionLanguage&lt;BR /&gt;Nov 02, 2012 6:59:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseProcessDefinitions&lt;BR /&gt;INFO: Process with id='Uc2InvoiceProcess' hasn't the attribute isExecutable set. Please maintain it, so you are compatible to future activiti versions.&lt;BR /&gt;INFO : [CSPSTEP] released (item=177 step=CspstepInvoiceApproval assignmentDate=02.11.12 18:39, step=CspstepInvoiceApproval) &lt;BR /&gt;Nov 02, 2012 6:59:09 PM org.activiti.engine.impl.interceptor.CommandContext close&lt;BR /&gt;SEVERE: Error while closing command context&lt;BR /&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.deleteTask-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### SQL: delete from ACT_RU_TASK where ID_ = ?&lt;BR /&gt;### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:158)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession$DeleteById.execute(DbSqlSession.java:146)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:483)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:371)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:157)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:109)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)&lt;BR /&gt; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;BR /&gt; at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:144)&lt;BR /&gt; at biz.i2z.connector.activiti.ActivitiConnector.complete(ActivitiConnector.java:976)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskInActiviti(ActivitiAccessor.java:2016)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskData(ActivitiAccessor.java:1971)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskData(ActivitiAccessor.java:1927)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.workOnProcess(ActivitiAccessor.java:1891)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.WorkflowAccessorEnrichmentProxy.invoke(WorkflowAccessorEnrichmentProxy.java:132)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;BR /&gt; at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)&lt;BR /&gt; at $Proxy75.workOnProcess(Unknown Source)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:468)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:450)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:431)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.processRequest(ApplicationProcess.java:380)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.ipcStart(ApplicationProcess.java:607)&lt;BR /&gt; at biz.i2z.system.I2zProcess.ipcProcessing(I2zProcess.java:263)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.run(ApplicationProcess.java:656)&lt;BR /&gt;Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:390)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:322)&lt;BR /&gt; at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)&lt;BR /&gt; at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)&lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:58)&lt;BR /&gt; at $Proxy73.execute(Unknown Source)&lt;BR /&gt; at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:41)&lt;BR /&gt; at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:66)&lt;BR /&gt; at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:45)&lt;BR /&gt; at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108)&lt;BR /&gt; at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:145)&lt;BR /&gt; … 39 more&lt;BR /&gt;&lt;BR /&gt;WARN : updateTaskData(taskIds=[(contid=1211021714529005cb96d64f4924955b¦pid=119¦taskid=191¦execid=119¦businessid=)], username='svc_cspstep', password=' ÿ**************', attributes={}, taskStatus=completed): updating the process instances caused failures: [(contid=1211021714529005cb96d64f4924955b¦pid=119¦taskid=191¦execid=119¦businessid=)] &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.deleteTask-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### SQL: delete from ACT_RU_TASK where ID_ = ?&lt;BR /&gt;### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; &lt;BR /&gt;INFO : [CSPSTEP] released (item=191 step=CspstepInvoiceApproval assignmentDate=02.11.12 18:39, step=CspstepInvoiceApproval) &lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;afterwards I shut down the system and changed the database isolation level like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ALTER DATABASE activiti SET READ_COMMITTED_SNAPSHOT ON;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and re-run the test. The interesting thing is now that I get two deadlocks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;### Error updating database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.deleteTask-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### SQL: delete from ACT_RU_TASK where ID_ = ?&lt;BR /&gt;### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:158)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession$DeleteById.execute(DbSqlSession.java:146)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:483)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:371)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:157)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:109)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)&lt;BR /&gt; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;BR /&gt; at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:144)&lt;BR /&gt; at biz.i2z.connector.activiti.ActivitiConnector.complete(ActivitiConnector.java:976)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskInActiviti(ActivitiAccessor.java:2016)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskData(ActivitiAccessor.java:1971)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskData(ActivitiAccessor.java:1927)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.workOnProcess(ActivitiAccessor.java:1891)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.WorkflowAccessorEnrichmentProxy.invoke(WorkflowAccessorEnrichmentProxy.java:132)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;BR /&gt; at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)&lt;BR /&gt; at $Proxy75.workOnProcess(Unknown Source)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:468)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:450)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:431)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.processRequest(ApplicationProcess.java:380)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.ipcStart(ApplicationProcess.java:607)&lt;BR /&gt; at biz.i2z.system.I2zProcess.ipcProcessing(I2zProcess.java:263)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.run(ApplicationProcess.java:656)&lt;BR /&gt;Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:390)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:322)&lt;BR /&gt; at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)&lt;BR /&gt; at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)&lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor450.invoke(Unknown Source)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:58)&lt;BR /&gt; at $Proxy73.execute(Unknown Source)&lt;BR /&gt; at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:41)&lt;BR /&gt; at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:66)&lt;BR /&gt; at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:45)&lt;BR /&gt; at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108)&lt;BR /&gt; at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:145)&lt;BR /&gt; … 39 more&lt;BR /&gt;&lt;BR /&gt;WARN : updateTaskData(taskIds=[(contid=12110219090315951539f5ad06744e99¦pid=510¦taskid=563¦execid=510¦businessid=)], username='svc_cspstep', password=' ÿ**************', attributes={}, taskStatus=completed): updating the process instances caused failures: [(contid=12110219090315951539f5ad06744e99¦pid=510¦taskid=563¦execid=510¦businessid=)] &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.deleteTask-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### SQL: delete from ACT_RU_TASK where ID_ = ?&lt;BR /&gt;### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; &lt;BR /&gt;INFO : [CSPSTEP] released (item=563 step=CspstepInvoiceApproval assignmentDate=02.11.12 19:15, step=CspstepInvoiceApproval) &lt;BR /&gt;Nov 02, 2012 7:16:31 PM org.activiti.engine.impl.interceptor.CommandContext close&lt;BR /&gt;SEVERE: Error while closing command context&lt;BR /&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.deleteTask-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### SQL: delete from ACT_RU_TASK where ID_ = ?&lt;BR /&gt;### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:158)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession$DeleteById.execute(DbSqlSession.java:146)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:483)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:371)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:157)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:109)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)&lt;BR /&gt; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;BR /&gt; at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:144)&lt;BR /&gt; at biz.i2z.connector.activiti.ActivitiConnector.complete(ActivitiConnector.java:976)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskInActiviti(ActivitiAccessor.java:2016)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskData(ActivitiAccessor.java:1971)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.updateTaskData(ActivitiAccessor.java:1927)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.impl.activiti.ActivitiAccessor.workOnProcess(ActivitiAccessor.java:1891)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)&lt;BR /&gt; at biz.i2z.container.workflowaccessor.WorkflowAccessorEnrichmentProxy.invoke(WorkflowAccessorEnrichmentProxy.java:132)&lt;BR /&gt; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;BR /&gt; at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)&lt;BR /&gt; at $Proxy75.workOnProcess(Unknown Source)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:468)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:450)&lt;BR /&gt; at biz.i2z.modules.workflowaccessor.ServiceObject.workOnProcess(ServiceObject.java:431)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.processRequest(ApplicationProcess.java:380)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.ipcStart(ApplicationProcess.java:607)&lt;BR /&gt; at biz.i2z.system.I2zProcess.ipcProcessing(I2zProcess.java:263)&lt;BR /&gt; at biz.i2z.system.ApplicationProcess.run(ApplicationProcess.java:656)&lt;BR /&gt;Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:390)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)&lt;BR /&gt; at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:322)&lt;BR /&gt; at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)&lt;BR /&gt; at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)&lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor450.invoke(Unknown Source)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:601)&lt;BR /&gt; at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:58)&lt;BR /&gt; at $Proxy73.execute(Unknown Source)&lt;BR /&gt; at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:41)&lt;BR /&gt; at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:66)&lt;BR /&gt; at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:45)&lt;BR /&gt; at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108)&lt;BR /&gt; at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:145)&lt;BR /&gt; … 39 more&lt;BR /&gt;&lt;BR /&gt;WARN : updateTaskData(taskIds=[(contid=1211021908545654696a23144864904a¦pid=519¦taskid=570¦execid=519¦businessid=)], username='svc_cspstep', password=' ÿ**************', attributes={}, taskStatus=completed): updating the process instances caused failures: [(contid=1211021908545654696a23144864904a¦pid=519¦taskid=570¦execid=519¦businessid=)] &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.deleteTask-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### SQL: delete from ACT_RU_TASK where ID_ = ?&lt;BR /&gt;### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.&lt;BR /&gt; &lt;BR /&gt;INFO : [CSPSTEP] released (item=570 step=CspstepInvoiceApproval assignmentDate=02.11.12 19:15, step=CspstepInvoiceApproval) &lt;BR /&gt;INFO : [CSPSTEP] released (item=556 step=CspstepInvoiceApproval assignmentDate=02.11.12 19:15, step=CspstepInvoiceApproval) &lt;BR /&gt;INFO : starting queue process.cspstep &lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;so I think lowering the database isolation just made it worse.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The szenario I am testing is the following: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in my process invoices are filled out and then we route these invoices (once completed) to a &lt;/SPAN&gt;&lt;STRONG&gt;user task&lt;/STRONG&gt;&lt;SPAN&gt; assigned to the queue cspstep.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a thread that queries all the tasks assigned to the group cspstep on a regular basis and then spawns a configurable number of threads) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to process the tasks found in parallel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This processing is fine but when the results of the processing (in my case 3 invoices in parallel) is to be written back (in my case some task variable updates and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the completion of the user task) these deadlocks occur.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(The reason we have choosen to implement this automation based on a user task is that we can easily query the tasks to be processed and delegate the tasks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in case of failure to some admin group that can handle the issue and then delegate it back to be processed again).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something wrong with this approach and activiti is not able to process user tasks in parallel?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; regards, chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 18:36:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87909#M59611</guid>
      <dc:creator>christoph_retti</dc:creator>
      <dc:date>2012-11-02T18:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87910#M59612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What I also tried now was to embedd my data source into a transaction aware datasource like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;lt;bean id="activiti.dataSource.dbcp.tx" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;property name="targetDataSource" ref="activiti.dataSource.dbcp" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;lt;bean id="activiti.dataSource.dbcp" class="org.apache.commons.dbcp.BasicDataSource"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="driverClassName" ref="activiti.jdbc.driver" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="url" ref="activiti.jdbc.url" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="username" ref="activiti.jdbc.username" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="password" ref="activiti.jdbc.password" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="maxIdle" value="2" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="maxActive" value="10" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="maxWait" value="10000" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="validationQuery" value="select 1" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="testOnBorrow" value="false" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="testWhileIdle" value="true" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="timeBetweenEvictionRunsMillis" value="1200000" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="minEvictableIdleTimeMillis" value="1800000" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="numTestsPerEvictionRun" value="5" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="defaultAutoCommit" value="false" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;wich did not help either&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 18:58:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87910#M59612</guid>
      <dc:creator>christoph_retti</dc:creator>
      <dc:date>2012-11-02T18:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87911#M59613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did a few more testing and when I changed the configuration to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;nbsp; &amp;lt;bean id="activiti.dataSource.spring" class="org.springframework.jdbc.datasource.SimpleDriverDataSource"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="driverClass" ref="activiti.jdbc.driver" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="url" ref="activiti.jdbc.url" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="username" ref="activiti.jdbc.username" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="password" ref="activiti.jdbc.password" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;bean id="activiti.dataSource.spring.tx" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="targetDataSource" ref="activiti.dataSource.spring" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;bean id="activiti.processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="dataSource" ref="activiti.dataSource.spring.tx" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="transactionManager" ref="activiti.transactionManager" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="databaseSchemaUpdate" value="true" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; …&lt;BR /&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;using the &lt;/SPAN&gt;&lt;EM&gt;org.springframework.jdbc.datasource.SimpleDriverDataSource&lt;/EM&gt;&lt;SPAN&gt; instead of the pooled dbcp version &lt;/SPAN&gt;&lt;EM&gt;org.apache.commons.dbcp.BasicDataSource&lt;/EM&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;then the deadlocks are gone.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question for me now is if this simpler configuration forces a synchronization on the (single?) JDBC connection or is there a problem when using&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;database connection pools?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody have experience/examples using activiti with a database connection pool?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; regards, chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 13:18:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87911#M59613</guid>
      <dc:creator>christoph_retti</dc:creator>
      <dc:date>2012-11-03T13:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87912#M59614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;wow, thanks for following up so good. Very interesting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have nothing conclusive on it, but I had the same experience with DBCP. If I ran my tests with very high concurrency, the system would just lock up. But that was on MySQL, and I didn't get deadlocks. Or maybe I just didnt wait long enough ….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I switched then to BoneCP: &lt;/SPAN&gt;&lt;A href="http://www.jorambarrez.be/blog/2012/04/30/dbcp_vs_c3p0_bonecp/" rel="nofollow noopener noreferrer"&gt;http://www.jorambarrez.be/blog/2012/04/30/dbcp_vs_c3p0_bonecp/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;And all my problems were gone (and performance was better)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 08:16:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87912#M59614</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-11-05T08:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87913#M59615</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;SPAN&gt;I had same issue with SQL Server, and I fixed using below configuration:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cause&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL Server is escalating row locks (in this case deleting a draft from the CONTENT table) to table locks and stopping other transactions from accessing the table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Diagnosis&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Check whether you are using the recommended transaction isolation level of "Read Committed with Row Versioning" by running this SELECT query. If this query which should result in '1', you are already using it. If it returns '0', proceed to the Workaround section:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT sd.is_read_committed_snapshot_on&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FROM sys.databases AS sd&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WHERE sd.[name] = '&amp;lt;database_name&amp;gt;';&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Workaround&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Configure your database to use the isolation level, Read Committed with Row Versioning. You can do this by executing the following query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ALTER DATABASE &amp;lt;database_name&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; SET READ_COMMITTED_SNAPSHOT ON&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; WITH ROLLBACK IMMEDIATE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Edgar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 17:42:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87913#M59615</guid>
      <dc:creator>edgarjoao</dc:creator>
      <dc:date>2016-04-20T17:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: activiti &amp; thread safety</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87914#M59616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Edgar, many thanks for posting this. I'm sure many people will find it helpful!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 10:39:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-thread-safety/m-p/87914#M59616</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-04-26T10:39:35Z</dc:date>
    </item>
  </channel>
</rss>

