ESB + WCF 多个服务上的事务

发布于 2024-11-14 03:58:23 字数 123 浏览 2 评论 0 原文

我有一个带有代理的 ESB (Aqualogic)。

这个代理将调用 3 个不同的服务,我必须将这 3 个服务放在事务范围中...

ESB 不支持事务...

有人知道任何解决方案吗?

I have an ESB (Aqualogic) that have a proxy.

This proxy will call 3 different services, and i have to put those 3 services in a transaction scope...

ESB doesn't have support to transactions...

Someone know any solution to that?

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

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

发布评论

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

评论(1

日裸衫吸 2024-11-21 03:58:23

我对 Aqualogic 并不熟悉,但总的来说,我可以说你想做的事情非常非常困难。

如果 Aqualogic 使用 MSMQ 进行传输,那么您可以通过使用事务队列获得某种形式的事务支持。但这只是开始。

如果要将 WCF 服务与事务上下文集成,则需要设置对 WS-Atomic 协议的支持(请参阅 http://msdn.microsoft.com/en-us/library/ms729784.aspxhttp://social.msdn.microsoft.com/Forums/en/wcf/thread/cae32545-6536-4631-b89f-54f55da62199)。这是屁股的严重疼痛。

不仅要配置它,还要使用它。跨服务器使用 WS-Atomic 意味着您需要在所有计算机上激活 MSDTC,并且这些 MSDTC 之间的协调非常慢并且容易出现长时间超时。

最好不要期望在单个事务中运行所有内容,而是使用可以补偿操作的部分成功/部分失败的工作流程。另请参阅 http://msdn.microsoft.com/en-us/library/dd483319 .aspx 为例。

I am not familiar with Aqualogic, but in general I can say that what you want to do is very, very difficult.

If Aqualogic uses MSMQ for transport then you may have some form of support for transactions by using transactional queues. But that's only the start.

If you want to integrate WCF services with a transactional context, you need to set up support for the WS-Atomic protocol (see http://msdn.microsoft.com/en-us/library/ms729784.aspx and http://social.msdn.microsoft.com/Forums/en/wcf/thread/cae32545-6536-4631-b89f-54f55da62199). This is a serious pain in the butt.

Not just to configure it, but also to use it. Using WS-Atomic across servers means you need to activate MSDTC on all machines, and coordination between these MSDTC's is very slow and prone to long timeouts.

It's a better bet to not expect to run everything in a single transaction, but to use a workflow that compensates for partial success/partial failure of your operation. See also http://msdn.microsoft.com/en-us/library/dd483319.aspx for an example.

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