多个Web服务调用周围是否有交易? [英] Are there any transactions around multiple webservice calls?

查看:46
本文介绍了多个Web服务调用周围是否有交易?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前,我在stackoverflow和ASP.net论坛中问了这个问题.我得到的答案是不,这是不可能的.事务不能越过Web服务边界"多个Web服务调用周围是否有交易?

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?

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

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?

推荐答案

周围是否有任何交易多个网络服务调用?

Are there any transactions around multiple webservice calls?

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

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).

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

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.

因此,答案是肯定的,通常是可能的.但是,如果您正在谈论合并围绕任意第三方服务的交易(正如您之前的问题似乎在讨论),那么可能是不可能的,因为这些第三方服务很可能不支持WSAT(并且我不怪他们!).

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.

这篇关于多个Web服务调用周围是否有交易?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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