避免交易范围的死锁 [英] Avoid deadlock for transaction scope

查看:64
本文介绍了避免交易范围的死锁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们使用时,我遇到了类似死锁的问题 具有dbcontexts的事务作用域可以在一个事务作用域下以多种方法实现,并且如果在执行之间发生任何异常,则系统MSDTC将自动处理所有执行级别的回滚.

因此,我们希望在使用的一个范围内完成交易 每个方法独立的dbcontext(为每个方法配置dbcontext)并按顺序执行.这里我们面临的是msdtc无法处理的回滚功能,因此请建议如何实现独立方法的回滚功能.

请尽快向我们提供一些示例和建议

谢谢

Sangamesh Arali

解决方案

Sangamesh arali,

感谢您在此处发布.

对于您的问题,请参考此 ADO.NET实体框架和LINQ实体中 span> 论坛.

最好的问候,

Wendy


Hi,

I am facing a problem like deadlock issue when we are using a transaction scope with dbcontexts to achieve in multiple methods which come under one transaction scope and if any exception occurs in between the execution then the system MSDTC will take care of rollback of all levels of execution automatically.

So we want to achieve transaction with one scope that we are using independent dbcontext for each method(dispose dbcontext for each method) and execute sequentially. Here we are facing rollback functionality which is not handled by msdtc so please suggest how to achieve rollback functionality for independent methods.

please guide us with some examples and suggestions asap

Thank you

Sangamesh Arali

解决方案

Hi Sangamesh arali,

Thank you for posting here.

For your question, please refer to this thread in ADO.NET Entity Framework and LINQ to EntitiesForum.

Best Regards,

Wendy


这篇关于避免交易范围的死锁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆