[
https://issues.apache.org/jira/browse/ODE-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605904#action_12605904
]
Rafal Rusin commented on ODE-303:
---------------------------------
To be more precise, <invoke/> statements work synchronously (which is bad) in
version 1.2RC1 in JBoss (with axis2), but they work asynchronously in 1.2RC1 in
ServiceMix JBI (and this is very good news).
However I've got some processes deployed in JBoss (and migration won't be
easy), so I'd appreciate if you could give me some advice on how I could make
it asynchronous in J2EE version.
> 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
>
> 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.