长时间运行和非事务性编排之间的区别
为编排或范围设置的长时间运行事务类型和无事务类型之间有什么区别。 我知道的一个区别是长时间运行的事务可以有补偿块。
what is the difference between Long Running transaction type and None transaction type, set for an orchestration or a scope.
One difference that I know is that Long Running transaction can have compensation block.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有事务的作用域通常用作 try/catch 块,只是为了处理异常。一个长期运行的事务范围是一个事务,正如您所指出的,它可以具有与其关联的补偿块以“撤消”其工作。
最常见的是,长时间运行的事务不是孤立使用的……它将包含嵌套事务(原子事务和单独长时间运行的事务),外部事务通过补偿来协调任何不会自动回滚的嵌套事务的撤消。
A scope with no transaction is usually used as a try/catch block just to handle exceptions. A long running transaction scope is, well, a transaction, which as you point out can have compensation blocks associated with it to "undo" its work.
Most commonly, a long running transaction isn't used in isolation... it will contain nested transactions (both atomic and long running on their own), with the outer transaction coordinating through compensations the undoing of any nested transactions not automatically rolled back.