Why is the inteceptor method onFlushDirty() called when session.isDirty() is invoked?
It causes the code in the inteceptor to run twice, once when I check to see if the session is dirty and once when I flush the session.
I'm using version 2.1.4 from cvs.
Here is the strace showing how the method is called.
Code:
java.lang.Exception: Show stack trace
at MyIntercepter.onFlushDirty(MyIntercepter.java:64)
at net.sf.hibernate.impl.SessionImpl.flushEntity(SessionImpl.java:2528)
at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2447)
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2249)
at net.sf.hibernate.impl.SessionImpl.isDirty(SessionImpl.java:2311)
at PersistenceManager.commit(PersistenceManager.java:318)
.....