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
精彩评论