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