What about when deadlocking can't be eliminated? I can certainly see this as being a possible problem in high concurrency environments even after tuning.
It's irritating to say the least to have to re-do the entire unit of work rather than simply catching the exception and re-executing the query a preset number of times if it's a deadlock error. That said, I have no idea of how this could be accomplished with NH or even if it's possible. Symon. Symon Rottem http://blog.symbiotic-development.com On Fri, Oct 16, 2009 at 2:25 PM, Jason Meckley <[email protected]>wrote: > > exceptions represent something exceptional. why would you want to use > the same session which just had an exception? i would dispose of the > current session and try again with a brand new session. I think this > is what NH recommends (requires?) anyway. What is the benefit of re- > using the session rather that starting with a new session? > > also if you are receiving deadlocks with your queries I would profile > you sql queries and try to improve their performance. I was able to > solve a deadlock issue with a messaging service I was using simply by > applying indexes to key columns. after that deadlocking became a non- > issue. > > On Oct 16, 6:02 am, Graham Bunce <[email protected]> wrote: > > Any NH guru's got any feedback on whether resubmitting without > > starting a new session is acceptable in database exception cases such > > as timeout or deadlock? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
