-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Resubmitting Session/Transaction after deadlock
PostPosted: Tue Jun 20, 2006 5:23 pm 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.