Hi,
Could AbstractFlushingEventListener's exception handling be changed to avoid the following noise in the logs when StaleObjectStateExceptions are thrown?
i.e. can it simply rethrow the exception and leave it to the application to decide whether or not it is truly an error condition that needs to be logged?
Thanks
Hibernate version:
3.0.2
Full stack trace of any exception that occurs:
4:50:13,798 ERROR AbstractFlushingEventListener:277 - Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [test.User#1]
at org.hibernate.persister.entity.BasicEntityPersister.check(BasicEntityPersister.java:1438)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:1983)
at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.java:1906)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2146)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:75)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:678)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:309)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
|