HHH-10900 - ExceptionConverter throws an exception if the Proxy is no longer reachable

This commit is contained in:
Vlad Mihalcea 2016-06-28 15:14:08 +03:00
parent 9c74438e99
commit dc5fe2cde8
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ public class ExceptionConverterImpl implements ExceptionConverter {
final Serializable identifier = sose.getIdentifier();
if ( identifier != null ) {
try {
final Object entity = sharedSessionContract.load( sose.getEntityName(), identifier );
final Object entity = sharedSessionContract.internalLoad( sose.getEntityName(), identifier, false, true);
if ( entity instanceof Serializable ) {
//avoid some user errors regarding boundary crossing
pe = new OptimisticLockException( e.getMessage(), e, entity );