Figure 1 illustrates what happens when you use local transactions without a compensation framework.
图1展示了不使用补偿框架只使用本地事务会发生什么。
Notice that once the stored procedure returns successfully it registers with the compensation framework.
注意,一旦存储过程成功返回,它就会使用补偿框架注册。
Writing a custom compensation framework sounds like a daunting task, but it isn't overly complex — just time consuming.
编写自定义补偿框架似乎令人望而生畏,但实际上它并不十分复杂 — 只是很耗时。
The compensation framework is there only to assist in the event of an error; it doesn't get in the way when things work correctly.
补偿框架只是在发生错误时进行协助;一切正常时它不会出现。
As a result, you'll most likely find yourself creating your own custom compensation framework when using this transaction strategy.
因此,使用这种事务策略时,很可能发现要创建自己的自定义补偿框架。
Writing a custom compensation framework sounds like a daunting task, but it isn't overly complex - just time consuming.
编写自定义补偿框架似乎令人望而生畏,但实际上它并不十分复杂—只是很耗时。
The answer is that the High Performance strategy leverages the Local Transaction model in conjunction with a compensation framework.
答案是高性能策略利用本地事务模型,配合补偿框架一起使用。
When the third stored procedure fails, it triggers an event telling the compensation framework to reverse everything included in this compensation scope.
第三个存储过程失败时,它会触发一个事件,告诉补偿框架反转此补偿范围中包含的一切。
The source code example in Listing 3 illustrates the technique of applying a custom compensation framework to the original application source code in Listing 1
清单3中的源代码示例阐释了将自定义补偿框架应用到 清单1 中的原始应用程序源代码的技术
Also, you don't need to use JMS asynchronous messaging for the compensation framework, but I find it useful for addressing issues surrounding compensation failures.
另外您不需要对补偿框架使用jms异步消息传递,但是我发现在处理补偿故障相关的问题时它很有用。
The rest of this article describes an existing compensation framework and shows a simple implementation using a custom solution to illustrate the concepts I've described.
本文剩下的部分将介绍现有的补偿框架并展示一个使用自定义解决方案的简单实现来阐释我前面介绍的概念。
The source code in Listings 2 and 3 is certainly far from production-ready, but it does illustrate the techniques involved with building a compensation framework of your own.
清单2和3中的源代码距离用于生产的标准还比较远,但是它的确阐释了构建您自己的补偿框架涉及的技术。
Although the J2EE Activity Service specification is primarily targeted for application server vendors, you can apply the same concepts to your own custom compensation framework.
尽管J2EEActivityService规范主要针对应用服务器厂商,也可以将同样的概念应用到您自己的自定义补偿框架。
Whether you use an open source, commercial, or custom compensation framework, you still must provide the method, SQL, or stored procedure to invoke to reverse the database update operations.
无论使用开源、商业还是自定义补偿框架,您都必须提供可以调用的方法、SQL或存储过程来反转数据库更新操作。
Whether you use an open source, commercial, or custom compensation framework, you still must provide the method, SQL, or stored procedure to invoke to reverse the database update operations.
无论使用开源、商业还是自定义补偿框架,您都必须提供可以调用的方法、SQL或存储过程来反转数据库更新操作。
应用推荐