[jboss-user] [JBoss jBPM] - Re: Lost update problem?

twiceknightly do-not-reply at jboss.com
Wed Jul 2 16:49:30 EDT 2008


I see what you mean kukeltje about keeping the changes local(related to the token) first, then adding the changes to the higher level.  I'm not sure that would work though and this is my reasoning.

Eventhough the tokens have a different scope there is still only one context instance being shared between two threads. So 

1. Thread one gets the context instance with variable A stored already at the root level.
2. Thread two gets the context instance with variable A stored already at the root level.
3. Thread one makes an update to his local var B and persists both his var B and var A.
4. Thread two makes an update to his local var C and persits both his var C and var A

Unfortunately the persistence of local var B by thread one (number 3) is lost when 4 is performed?

Is this not correct?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162186#4162186

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162186



More information about the jboss-user mailing list