[
https://issues.apache.org/jira/browse/ODE-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608675#action_12608675
]
Rafal Rusin commented on ODE-303:
---------------------------------
>> What do you mean by "invoke statements work synchronously" ? We have to keep
>> a thread holding the connection, otherwise we lose the transport connection.
>> However and invocation doesn't block the engine as it's asynchronous with
>> respect to the communication layer.
If you say that bpel engine is not blocked during processing invoke, but only
the communication layer, then it's good. But my tests with ODE JBI 1.2-RC1 in
JBoss seem to show something other, because the following example hangs in
JBoss and works fine in JBI with threads.pool.size set to 1:
A:
receive M
invoke B
reply M
B:
receive M
reply M
Regards
> OptimisticLockException
> -----------------------
>
> Key: ODE-303
> URL: https://issues.apache.org/jira/browse/ODE-303
> Project: ODE
> Issue Type: Bug
> Components: BPEL Runtime
> Affects Versions: 1.2
> Environment: JBI, Apache Servicemix, MySQL Internal, also happens on
> 1.1.1 version and Derby database
> Reporter: Rafal Rusin
> Attachments: deadlock-test.tar.gz
>
>
> I was trying to run a process which receives a message with correlation ID,
> and discards incoming requests if it's already processing a given ID.
> I did the following (simplified notation):
> <receive correlation=cid/>
> <flow>
> <scope>some processing</scope>
> <scope>
> <pick correlation=cid/>
> <throw>discarded</throw>
> </scope>
> </flow>
> Then I run 10 requests and I had a following error:
> 06:07:58,628 | WARN | pool-4-thread-3 | Transaction |
> action.manager.TransactionImpl 516 | Unexpected exception from
> beforeCompletion; transaction will roll back
> <openjpa-1.0.1-r420667:592145 nonfatal store error>
> org.apache.openjpa.persistence.OptimisticLockException: Optimistic locking
> errors were detected when flushing to the data store.
> The following objects may have been concurrently modified in another
> transaction:
> [org.apache.ode.dao.jpa.MessageRouteDAOImpl-org.apache.ode.dao.jpa.MessageRouteDAOImpl-905]
> at
> org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2104)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
> at
> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
> at
> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
> at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
> at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:498)
> at
> org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
> at
> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
> at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:181)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:335)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:332)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: <openjpa-1.0.1-r420667:592145 nonfatal store error>
> org.apache.openjpa.persistence.OptimisticLockException: An optimistic lock
> violation was detected when flushing object
> instance
> "org.apache.ode.dao.jpa.MessageRouteDAOImpl-org.apache.ode.dao.jpa.MessageRouteDAOImpl-905"
> to the data store. This indicates that the object was concurrently modified
> in a
> nother transaction.
> FailedObject:
> org.apache.ode.dao.jpa.MessageRouteDAOImpl-org.apache.ode.dao.jpa.MessageRouteDAOImpl-905
> at
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:101)
> at
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:73)
> at
> org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:543)
> at
> org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:119)
> at
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)
> at
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
> at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:514)
> at
> org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
> ... 16 more
> 06:07:58,635 | DEBUG | pool-4-thread-3 | sql |
> utils.LoggingConnectionWrapper 215 | close
> 06:07:58,637 | DEBUG | pool-4-thread-3 | yRoleMessageExchangeImpl |
> ne.MyRoleMessageExchangeImpl$1 217 | Received myrole mex response callback
> 06:07:58,638 | ERROR | pool-4-thread-3 | SimpleScheduler |
> duler.simple.SimpleScheduler$4 356 | Error while executing transaction
> javax.transaction.RollbackException: Unable to commit: transaction marked for
> rollback
> at
> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:271)
> at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:181)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:335)
> at
> org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:332)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Currently, I resolved this by setting
> ode-jbi.threads.pool.size=1
> But is this workaround OK? I worry that this single thread may block on some
> communication and the whole bpel engine will hang.
> Regards
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.