HHH-13640 : Minor improvement
This commit is contained in:
parent
cec4228d70
commit
d6376834a7
|
@ -241,8 +241,9 @@ public class DefaultLoadEventListener implements LoadEventListener {
|
||||||
|
|
||||||
final EventSource session = event.getSession();
|
final EventSource session = event.getSession();
|
||||||
final SessionFactoryImplementor factory = session.getFactory();
|
final SessionFactoryImplementor factory = session.getFactory();
|
||||||
|
final boolean traceEnabled = LOG.isTraceEnabled();
|
||||||
|
|
||||||
if ( LOG.isTraceEnabled() ) {
|
if ( traceEnabled ) {
|
||||||
LOG.tracev(
|
LOG.tracev(
|
||||||
"Loading entity: {0}",
|
"Loading entity: {0}",
|
||||||
MessageHelper.infoString( persister, event.getEntityId(), factory )
|
MessageHelper.infoString( persister, event.getEntityId(), factory )
|
||||||
|
@ -283,11 +284,11 @@ public class DefaultLoadEventListener implements LoadEventListener {
|
||||||
final Object proxy = persistenceContext.getProxy( keyToLoad );
|
final Object proxy = persistenceContext.getProxy( keyToLoad );
|
||||||
|
|
||||||
if ( proxy != null ) {
|
if ( proxy != null ) {
|
||||||
LOG.trace( "Entity proxy found in session cache" );
|
if( traceEnabled ) {
|
||||||
|
LOG.trace( "Entity proxy found in session cache" );
|
||||||
|
}
|
||||||
|
|
||||||
LazyInitializer li = ( (HibernateProxy) proxy ).getHibernateLazyInitializer();
|
if ( LOG.isDebugEnabled() && ( (HibernateProxy) proxy ).getHibernateLazyInitializer().isUnwrap() ) {
|
||||||
|
|
||||||
if ( li.isUnwrap() ) {
|
|
||||||
LOG.debug( "Ignoring NO_PROXY to honor laziness" );
|
LOG.debug( "Ignoring NO_PROXY to honor laziness" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue