|
There is an additional conceptual problem. Hibernate ORM might have flushed changes to the database before you run the Session.clear(), at that point if the transaction is committed, changes on the database which where flushed will apply. You don't want to clear the indexing tasks at that point.
I think we need to listen to Session.flush() events too, so to automate the "right" decision to be taken.
|