users@glassfish.java.net

Re: JPA optimistic locking inconsistency

From: <glassfish_at_javadesktop.org>
Date: Tue, 30 Oct 2007 14:59:13 PST

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