[jboss-user] [jBPM Users] - Re: Solution: JBPM3 and Spring Integration
do-not-reply at jboss.com
Tue Aug 25 07:43:29 EDT 2009
"mr_magoo" wrote : Note that because of the use of the transaction template, hibernate will assume that any staleobject exception coming out of the commit is an error. It will log and throw this exception.
| Personally I think this is very bad form in a library! :) In a multi-instance environment you will have to manually silence it as these optimistic lock failures are perfectly ok. They are caught and silenced in the core jbpm executor code but of course will not occur because of the delayed commit.
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.job.ExecuteNode
| | Job#140392]
| | at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1782)
| | [...]
| | at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) <== CULPRIT!
| | [...]
| | at org.jbpm.SpringExecutorThread.acquireJobs(SpringExecutorThread.java:33)
| Please note that the above code does not deal with this problem at all. You will end up with 2 logged errors for every optimistic lock failure in a multi instance environment. The errors should be benign otherwise.
This is good to know. I'm not using Spring but I am getting this error when I'm executing multiple jobs in parallel using JBPM 4 and MySQL. I've been seeing all sorts of posts/blogs etc skimming this issue but none explaining the cause or if there is a solution.
The problem I am having is my workflow doesn't always complete because of the errors. It seems like it's a little hit and miss and sometimes will carry on through to completion and sometimes not.
Maybe should post in another thread.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251444#4251444
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251444
More information about the jboss-user