Non-inline code such as this (this process occurs as part of transaction
handling) is difficult to always wrap. In general this requires
delegation to handle properly
(org.hibernate.proxy.EntityNotFoundDelegate e.g.)
Another idea (that requires a whole separate thread) would be to
consolidate
I've noticed some cases where a native Hibernate exception is not wrapped in a
javax.persistence.OptimisticLockException.
EntityVerifyVersionProcess.java throws an org.hibernate.OptimisticLockException
that is passed on directly to JPA users.
EntityIncrementVersionProcess.java passes through th