Hi ,
we have a requirement to point a record for which the actual batch flush/commit 
has failed.
Is there a generic way by which hibernate can be hooked up for exception 
scenario to pull back the actual entity for which
DB/Hibernate Error has occurred .

Most of the times we could see the hibernate is printing the error in logs 
which has entity ID but which is not consistent.

Currently we are planning to use the Pre and Post (insert/Update/Delete) event 
handlers to retain the entities in Thread local
and display those in case of error, but these listeners will intercept all the 
DB operation irrespective of success/failure .

I am looking for a solution which will not impact the overall application 
performance and only in case of exception we need the details of entity.


Regards,
Sujit

_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to