Below you have the example how to rollback the transaction branch for a database.
下面的例子展示了如何为数据库回滚事务分支。
The third argument represents the transaction branch within the global transaction.
第三个参数表示该全局事务中的事务分支。
XAER_RMERR: This error indicates that a resource manager error occurred in the transaction branch.
XAER_RMERR:这个错误表示在事务分支中,某个资源管理器出错了。
If you are using IDS as a back end, there is also a hidden onmode flag that allows you to complete an open transaction branch.
如果您使用IDS作为后端,那么还有一个隐藏的onmode标志,允许您结束打开的事务分支。
Within this application, you are responsible for error handling in case an error is reported by a transaction branch, for example.
在该应用程序中,如果一个事务分支报告了错误,您就要负责进行错误处理。
In dynamic registration, only those resource managers which register with the transaction manager get involved in the transaction branch.
在动态注册中,事务分支中只包括那些向事务管理器注册的资源管理器。
Typically, an XAResource is implemented by a resource manager and is used to support the external coordination of the resource manager's transaction branch.
通常,资源管理器执行XAResource,它被用于支持资源管理器事务分支的对外协调。
Subsequently, the application may call xa_start to pass a transaction ID (XID) to a Resource Manager (RM) to associate the calling thread with a transaction branch.
随后,应用程序可以调用xa_start将一个事务ID (XID)传递给ResourceManager (RM),将调用者线程与一个事务分支相关联。
But there is still an open question mentioned in the section "Introduction into the Two-Phase-Commit protocol". What to do, if "Phase 2" failed for a transaction branch?
但是“两阶段提交协议简介”小节中提到仍然存在一个问题,那就是如果第2阶段中一个事务分支发生故障,该怎么办呢?
One solution would be to have a small application that joins the open transaction branch within the engine that advises the engine to commit or rollback the open transaction.
一种解决方案是用一个小型应用程序连接引擎中打开的事务分支,并通知引擎提交或回滚这一打开的事务。
Thread of control: Tells if the operations in a transaction need to be serialized in the process, or if multiple threads in a process can participate in the transaction branch.
Threadofcontrol:告诉事务中的操作是否需要在流程中序列化,或者流程中的多个线程是否可以参与事务分支。
But there is still an open question mentioned in the section "Introduction into the Two-Phase - Commit protocol". What to do, if "Phase 2" failed for a transaction branch?
但是“两阶段提交协议简介”小节中提到仍然存在一个问题,那就是如果第2阶段中一个事务分支发生故障,该怎么办呢?
But there is still an open question mentioned in the section "Introduction into the Two-Phase - Commit protocol". What to do, if "Phase 2" failed for a transaction branch?
但是“两阶段提交协议简介”小节中提到仍然存在一个问题,那就是如果第2阶段中一个事务分支发生故障,该怎么办呢?
应用推荐