[jboss-user] [jBPM] - Optimistic Locking at Join
Rachel Hodos
do-not-reply at jboss.com
Thu Jun 10 13:33:28 EDT 2010
Rachel Hodos [http://community.jboss.org/people/rhodos] created the discussion
"Optimistic Locking at Join"
To view the discussion, visit: http://community.jboss.org/message/547426#547426
--------------------------------------------------------------
One more question regarding transactions:
The following looks like a bug to me, from the User Guide:
"Value exclusive was selected to serialize the executions of the 2 asynchonous continuation jobs resulting from the fork. The respective transactions that will execute activities ship goods and send bill will both arrive at the join. At the join, both transactions will synchronize on the same execution (read: update the same execution row in the DB), resulting in a potential optimistic locking failure."
I've seen this in action, where an exception is thrown when I try to execute a forked process. The only workaround I've seen is to call Thread.sleep() in my driver class after I instantiate the process, where I must cause the thread to sleep until after the join is reached. However, this obviously requires knowing ahead of time about how long this will take.
Does anyone know a better way to deal with this? I was thinking there might be a way to use wait/notifyAll, either in the Fork and Join activities, or with the Join activity notifying the main thread in the driver class.
Any advice would be greatly appreciated.
Thanks,
Rachel
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/547426#547426]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100610/e4a7ed3d/attachment.html
More information about the jboss-user
mailing list