开发者

nhibernate transaction deadlock issue

I am currently facing transaction deadlock issues in Nhibernate data layer. The scenario is :

I have a large transaction table T1. This table undergoes frequent write/update operations. Also, a service frequently reads this table(based on filter) and merges the data with client cache(on client machine). The frequency of read is very high.

开发者_开发知识库

At times (does not follow pattern) , the deadlock issue surfaces.

How can I trace this issue?(I have dbo role). Is there any Nhibernate setting that can help in this context?


As your service only reads the table, you could change your application to use an optimistic lock approach.

More about optimistic locking with NH: http://www.google.com.br/url?sa=t&source=web&cd=5&ved=0CDMQFjAE&url=http%3A%2F%2Fknol.google.com%2Fk%2Ffabio-maulo%2Fnhibernate-chapter-5-basic-o-r-mapping%2F1nr4enxv3dpeq%2F8&ei=biB9TLjMNIL88AbQ4smNBw&usg=AFQjCNHpZ80cpxa6IqzxILfQU9XACQjbYA&sig2=md9f4mYYnvFPowB-RZbuag.

Filipe

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜