When you update the version externally (is it your case B?), the persistence provider doesn't know until flush that the version value has changed, so the transaction fails. In case A you at first refetch the values (right?), so the provider can compare your current value with the one it has in its (just updated) cache.
Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]
http://forums.java.net/jive/thread.jspa?messageID=242995