Hibernate version: 2.1.7
hi there,
i've got a for me strange behaviour and i just want to ask, if i'm thinking wrong ...
i need to write HistoryLogs to my db, so i use a Interceptor. In the postFlush-method all HistoryLogs are persisted ...
To write the insert-statements, i'm using the connection of the current session (for using the same transaction). The sql for the insert-Statement is generated from 'net.sf.hibernate.sql.Insert'.
My problem is now, that i'm getting an error and the insert fails ... well .. that's my fault ... the bigger problem is, that the resulting rollback doesn't work ...
That means:
a) an object X is deleted in DB
b) commit the changes
b2) writing the history-log-entry (which fails)
b3) perform rollback (the logs show me that it happens)
c) -> object X is not rolledback ?! It's deleted in db.
And yes .. the logs show me, that autocommit is false ;)
So my question is ... is the postFlush-method to late to do a complete rollback?
I mean i shouldn't get an error there, and i will fix that ... my question is just to be sure, what i can do ...
thanx!
curio
P.S.: Sorry for not showing an example ... if it's required, i will create a small one ...
|