Changed the error handling for LazyInitializationException to go through the throwLazyInitializationException method so that the collection role is reported.

This commit is contained in:
Shawn Clowater 2012-11-15 10:01:32 -07:00 committed by brmeyer
parent f4fc7f21a4
commit 1286c2319c
1 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
isTempSession = true; isTempSession = true;
} }
else { else {
throw new LazyInitializationException( "could not initialize proxy - no Session" ); throwLazyInitializationException( "could not initialize proxy - no Session" );
} }
} }
else if ( !session.isOpen() ) { else if ( !session.isOpen() ) {
@ -193,7 +193,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
isTempSession = true; isTempSession = true;
} }
else { else {
throw new LazyInitializationException( "could not initialize proxy - the owning Session was closed" ); throwLazyInitializationException( "could not initialize proxy - the owning Session was closed" );
} }
} }
else if ( !session.isConnected() ) { else if ( !session.isConnected() ) {
@ -203,7 +203,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
isTempSession = true; isTempSession = true;
} }
else { else {
throw new LazyInitializationException( "could not initialize proxy - the owning Session is disconnected" ); throwLazyInitializationException( "could not initialize proxy - the owning Session is disconnected" );
} }
} }