jpa @version optimistic locking
Posted
by cometta
on Stack Overflow
See other posts from Stack Overflow
or by cometta
Published on 2009-12-04T03:20:55Z
Indexed on
2010/05/26
6:51 UTC
Read the original article
Hit count: 306
I loaded same entity record on 2 separate browser window then press submit (hibernate template.merge), version number incremented for both browser window, but never caught any problem with optimistic lock.. so how to test this?
my save() look like this
hibernatetemplate().merge(..);
setJPAObject(null); //reset after save
© Stack Overflow or respective owner