Re: [hibernate-dev] Wrapping of optimistic exceptions

2012-11-12 Thread Steve Ebersole
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

[hibernate-dev] Wrapping of optimistic exceptions

2012-11-09 Thread Christian Bauer
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