AnsweredAssumed Answered

MessageEntity[] was updated by another transaction concurren

Question asked by javatech on Apr 19, 2012
Latest reply on Apr 19, 2012 by javatech
Hi
iam facing  org.activiti.engine.ActivitiOptimisticLockingException:
MessageEntity[18764] was updated by another transaction concurrently

while testing through JMeter for load testing with config as

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
   <property name="dataSource" ref="dataSource" />
   <property name="transactionManager" ref="transactionManager" />
   <property name="databaseSchemaUpdate" value="false" />
   <property name="jobExecutorActivate" value="true" />
   <property name="jpaEntityManagerFactory" ref="entityManagerFactory" />
   <property name="jpaHandleTransaction" value="true" />
   <property name="jpaCloseEntityManager" value="true" />
   
   </bean>

if number of threads more then 25, the above expectation throwing.
Any solution for this problem. Help really appreciated .

Image attached for reference.

org.activiti.engine.ActivitiOptimisticLockingException:
MessageEntity[18764] was updated by another transaction concurrently
   at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:452)
   at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:348)
   at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:149)
   at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:105)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:57)
   at java.lang.Thread.run(Unknown Source)

Attachments

Outcomes