Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
2.1.7
Name and version of the database you are using:
SQLServer 2000/2005
I have a problem with a heavily contended table getting deadlocked fairly often. The table is accessed maybe several times a second almost always doing updates or inserts.
My question is if I can somehow detect the deadlock (probably by doing some crude parsing of the exception error message or code) can I just recommit the hibernate transaction to try again or will the internal session state have been partially flushed/damaged by a partial commit or exception being thrown?
If the Session will be left in a broken state is there any way or methods that people have used to resubmit changes when the db error is non-fatal or recoverable?
Cheers.