Issue Details (XML | Word | Printable)

Key: HHH-1367
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Steve Ebersole
Reporter: Peter Mutsaers
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hibernate Core

warn level log "this operation breaks ==" may be disturbing

Created: 16/Jan/06 08:46 AM   Updated: 10/Oct/07 01:39 PM
Component/s: core
Affects Version/s: 3.1
Fix Version/s: 3.1.2

Time Tracking:
Not Specified

Environment: 3.1, oracle 9


 Description  « Hide
The ref. manual 19.1.3 warns that a proxy may break ==. This is fine and understood, however the org.hibernate.engine.StatefulPersistenceContext class emits a commons-logging warning for this.

We have such a case in productive code, we know it may break == and understand the consequences. However it is irritating that this warning is generated at runtime.

The code which emits this warning is executed very often (in a batch process). We do not want to generally disable the warning log level, but we don't want our logfiles to get filled with this warning either.
Since this class only generates this warning log (no other warn() case) we can disable the warn level for the class for now, as a work around.

IMHO a case that may be normal (even if you have to take care) should not continue to generate such warnings. It is not a case we can avoid, we have to access the class once as superclass, and later in the same session as the subclass.


 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Gavin King added a comment - 17/Jan/06 02:49 AM
This is a fair point. We should at least put it on its own category that can be easily suppressed.

Steve Ebersole added a comment - 20/Jan/06 10:15 AM
done. new logger is "org.hibernate.engine.StatefulPersistentContext.ProxyWarnLog"

Ed Shirey added a comment - 10/Oct/07 01:39 PM
Noticed when attempting to deploy this that the class name in the note above does not correspond to the class name in the current distribution.

The correct logger name is:

"org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog"

Note the "Persistence" instead of "Persistent". This is easily identified with some basic troubleshooting, but thought I'd try and save someone the 15 minutes.