Hi,
I'm using a custom PostInsertEventListener mapped to the "post-commit-insert" event to process domain objects. However, PostInsertEventListener's onPostInsert(PostInsertEvent) is getting called even when the insert was not successful (ie, due to a unique constraint in the database or some such).
This question was already asked
here but received no response: is this expected behavior? It looks to me like Hibernate should either a) not invoke the event listener if the insert failed or b) provide state (perhaps in the form of a boolean indicating success/failure).
The relevant code is in EntityInsertAction.afterTransactionCompletion(boolean), though the same thing happens in EntityDeleteAction and EntityUpdateAction.
Can one of the devs address this?
Thanks!