Print Page | Close Window

Deadlock determination

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3230
Printed Date: 13-May-2026 at 1:08pm


Topic: Deadlock determination
Posted By: ritaf
Subject: Deadlock determination
Date Posted: 23-Jan-2012 at 5:59pm

Hi,

I am a novice DevForce developer, so my question is probably very trivial.

Is there a way to detect deadlock errors (or to distinguish any other data provider errors) when EntityManager.SaveChanges/SaveChangesAsync fails? I want to retry saving changes if they fail due to the database deadlock.  When deadlock occurs I can see a particular type of exception on a server side in EntityServerSaveInspector.OnError as an InnerException but I am not sure if I can retry at this point.  On a client side, error is returned as a generic EntityManagerServerException and InnerException is not set.  I can see RemoteExceptionDetails but I cannot see the original error number, so I cannot make a determination that it’s a deadlock error.

Thank you,

Rita




Print Page | Close Window