EnterpriseServicesInteropOption for .NET to COM+ 称呼
我需要执行一些数据库更新,其中一部分将通过 COM+ 组件(将为事务启用),其他则通过标准 LINQ to SQL,并且我希望对一个事务的一部分进行两次更新。
我打算使用 TransactionScope 来允许 .NET 和 COM+ 事务同步。 然而,在阅读了有关 EnterpriseServicesInteropOption 的文档后,我仍然不确定自动和完整之间的差异。
我可以在我的情况下使用自动吗?
我感觉我可能会得到 RTFM 回复,但我发现这篇文章不清楚: http://msdn.microsoft.com/en-us /library/ms229974(VS.80).aspx
人们也将不胜感激任何更清晰的资源
I need to carry out some database updates, part of which will go through a COM+ component (that will be enabled for transactions), and others through standard LINQ to SQL, and I want both updates to part of one transaction.
I intend to use a TransactionScope to allow .NET and COM+ transactions to synchronise. However having read the documentation regarding EnterpriseServicesInteropOption, I am still uncertain of the differences between Automatic and Full.
Can I use Automatic in my case?
I can sense I may get a RTFM response, but I found this article unclear:
http://msdn.microsoft.com/en-us/library/ms229974(VS.80).aspx
Any clearer resources people have would also be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
区别在于,完全将始终创建 COM+ 事务上下文,而自动将在需要时创建一个。
因此,在需要 COM+ Transac 的情况下,主要区别在于应用程序何时会受到性能影响,是在 transac 开始时(使用“完全”),还是在需要时(使用“自动”),
如果您确定您将需要一个 COM+ 事务,选择 Full,但是...不要相信我:
测试! 很多!!
The difference is that Full will always create a COM+ transaction context, and Automatic will create one when needed.
So, in a case that a COM+ Transac is needed, the primary difference is when the app take the performance hit, at the beginning of the transac (with Full), or in the moment is needed (with Automatic)
If you are certain that you will need a COM+ transaction, go for Full, but ... don't believe me:
Test! a lot!!