-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: ProxyWarnLog Removed in Hibernate 4? (Infamous == logging!)
PostPosted: Thu Jan 09, 2014 10:00 am 
Newbie

Joined: Mon Jun 07, 2010 7:26 am
Posts: 5
I can find no reference to this but as far as I can tell, the logging specific "ProxyWarnLog" which Steve Ebersole added for https://hibernate.atlassian.net/browse/HHH-1367 is no longer available in Hibernate 4.

Can someone please confirm that this is the case or else, is there some other way to turn off the specific log message below which I've missed?

Context:

This is a golden-oldie. If Hibernate needs to narrow a proxy it outputs a warning in the log along the lines of:

Narrowing proxy to class com.YourClassHere - this operation breaks ==

However since most people aren't comparing persistent objects with pointer equality, most people don't care. So Steve Ebersole (back in 2006) added the ability to turn off just that log message instead of suppressing everything below error in StatefulPersistenceContext. And everyone's been happily suppressing that logging ever since.

However in Hibernate 4, not only has StatefulPersistenceContext been moved into org.hibernate.engine.internal (from org.hibernate.engine) but the ProxyWarnLog seems to have been removed entirely.

So you now need something like this to remove the log entries:

Code:
<logger category="org.hibernate.engine.internal.StatefulPersistenceContext">
    <level name="ERROR"/>
</logger>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.