是否存在围绕多个 Web 服务调用的任何事务?

发布于 2024-10-30 01:28:39 字数 491 浏览 0 评论 0原文

几天前我在 stackoverflow 和 ASP.net 论坛上问了这个问题。 我得到的答案是“不,这是不可能的。交易不能超越网络服务边界” 是否存在围绕多个 Web 服务调用的事务?

但在 ASP 中.net论坛我得到了以下答案: http://jalpesh.blogspot.com/ 2010/05/using-transactions-with-linq-to-sql.html 它提供system.transaction。 你对此有何建议?

A few days ago I asked this question in stackoverflow and ASP.net forums.
the answer which I got was "No, this is not possible. Transactions cannot go past web service boundaries"
Are there any transactions around multiple webservice calls?

but in ASP.net forum I got the answer below:
http://jalpesh.blogspot.com/2010/05/using-transactions-with-linq-to-sql.html
it's offering system.transaction.
what is your suggestion about it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

剩余の解释 2024-11-06 01:28:39

周边有没有交易
多个网络服务调用?

上述问题的答案是,在一般情况下,不同的 Web 服务可能参与同一事务。为此,您可以使用行业标准 WS-Transaction,它是 WS-Coordination 规范。感兴趣的规范是 WS-原子事务 (WSAT)

如果您在 Microsoft 堆栈上运行并且在所有计算机之间正确配置了 MSDTC,则可以在 Web 服务之间传递事务(请参阅 跨 AppDomains 传播事务

所以,答案是肯定的,这是可能的但是,一般来说,如果您正在谈论围绕任意第三方服务合并交易(正如您之前的问题所示),那么这是不可能的,因为这些第三方服务很可能不支持。 WSAT(我不会责怪他们!)。

不幸的是,在这些情况下,如果发生失败,您所能期望的最好的结果就是执行补偿操作。

Are there any transactions around
multiple webservice calls?

The answer to the above question is that in the general case it is possible to have disparate web services participate in the same transaction. To do this you would use the industry standard WS-Transaction which is part of the WS-Coordination specification. The specification of interest is WS-Atomic Transaction (WSAT).

If you are running on a Microsoft stack and have MSDTC configured properly between all machines then it is possible to pass transactions between web services (see Propagating a Transaction Across AppDomains.

So, the answer is yes, it is possible in general. However, if you are talking about incorporating transactions around arbitrary third party services (as your previous question appears to be about) then that is probably not possible because most likely those third party services do not support WSAT (and I don't blame them!).

Unfortunately, in these scenarios, the best you can hope for in the event of failure is to execute compensating actions.

空宴 2024-11-06 01:28:39

LINQ to SQL really has nothing to do with transactions around web service calls.

I remember reading about this: http://en.wikipedia.org/wiki/WS-Transaction but have no idea of the state of any of the implementations. So I won't say it can't be done, but if it is possible, based on the companies involved in the spec, it will be very expensive and very complex.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文