图1展示了不使用补偿框架只使用本地事务会发生什么。
Figure 1 illustrates what happens when you use local transactions without a compensation framework.
注意,一旦存储过程成功返回,它就会使用补偿框架注册。
Notice that once the stored procedure returns successfully it registers with the compensation framework.
答案是高性能策略利用本地事务模型,配合补偿框架一起使用。
The answer is that the High Performance strategy leverages the Local Transaction model in conjunction with a compensation framework.
补偿框架只是在发生错误时进行协助;一切正常时它不会出现。
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.
补偿框架就位后,发生错误时,成功的事务会被保留,这样会维持一致的数据库。
With a compensation framework in place, when an error occurs the successful transactions are reversed, resulting in a consistent database.
编写自定义补偿框架似乎令人望而生畏,但实际上它并不十分复杂 —只是很耗时。
Writing a custom compensation framework sounds like a daunting task, but it isn't overly complex — just time consuming.
本地事务和补偿框架(Compensation Framework)。
编写自定义补偿框架似乎令人望而生畏,但实际上它并不十分复杂—只是很耗时。
Writing a custom compensation framework sounds like a daunting task, but it isn't overly complex - just time consuming.
尽管通过使用补偿框架可以维护某种程度的数据库一致性,但是这个策略也会带来高度的风险。
Although you maintain some level of database consistency by using compensation frameworks, a high degree of risk is associated with this strategy.
第三个存储过程失败时,它会触发一个事件,告诉补偿框架反转此补偿范围中包含的一切。
When the third stored procedure fails, it triggers an event telling the compensation framework to reverse everything included in this compensation scope.
这是众多例子中的一个,仅此说明数据的不一致是如何发生的,即使使用了补偿框架来维持事务原子性。
This is just one of many examples illustrating how data inconsistency can occur, even when compensation frameworks are used to maintain transaction atomicity.
另外您不需要对补偿框架使用jms异步消息传递,但是我发现在处理补偿故障相关的问题时它很有用。
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.
清单3中的源代码示例阐释了将自定义补偿框架应用到 清单1 中的原始应用程序源代码的技术
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
清单2和3中的源代码距离用于生产的标准还比较远,但是它的确阐释了构建您自己的补偿框架涉及的技术。
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.
本文剩下的部分将介绍现有的补偿框架并展示一个使用自定义解决方案的简单实现来阐释我前面介绍的概念。
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.
补偿框架复杂而且有风险,无论是自己构建的还是开源或商业解决方案提供的(在本文稍后部分我会介绍一些)。
Compensation frameworks are complex and risky, whether you build them yourself or use one of the available open source or commercial solutions (which I'll get to a little later in this article).
无论使用开源、商业还是自定义补偿框架,您都必须提供可以调用的方法、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.
因此,在本部分中我会为您简单介绍一下J2EEActivityService,使您了解补偿框架是如何运作的。
Therefore, I'll give you a brief introduction to the J2EE Activity Service in this section so you understand how compensation frameworks operate.
尽管J2EEActivityService规范主要针对应用服务器厂商,也可以将同样的概念应用到您自己的自定义补偿框架。
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.
我们做出好的长期决定的利益,成为我们的文化框架,因为我们对经理们的补偿,依赖股价。
Our interest to make good long term choices is becoming cultural paradigm for us because so much of compensation of our managers depends on stock's price.
根据mihaly Csikszentmihalyi的流模型,他引入了一个框架,为了确定用来根据工作满意度平衡职工贡献的补偿。
Based on mihaly Csikszentmihalyi's flow model, he introduces a framework for determining compensation that balances employee contributions against job satisfaction.
本文论述了某高校食堂全现浇框架结构未设置伸缩缝,而采用UEA补偿收缩混凝土的设计方法。
This paper discusses the design method of adopting UEA compensation contraction concrete, without installing expansion joint in the entire cast-in-place framework of a college canteen.
现有的比较成熟的可伸缩编码框架是基于运动补偿时域滤波技术的。
Study of Scalable Video Coding Based on Lifting Wavelet Motion Compensation Technology;
现有的比较成熟的可伸缩编码框架是基于运动补偿时域滤波技术的。
Study of Scalable Video Coding Based on Lifting Wavelet Motion Compensation Technology;
应用推荐