simzyoo commented on issue #7323:
URL: 
https://github.com/apache/incubator-seata/issues/7323#issuecomment-2833888117

   > 注解化只需要与tcc一样增加注解,不需要流程编排的json文件,也不需要绘制对应的状态机流程。
   > 
   > ```
   > @CompensationBusinessAction(name = "DubboSagaActionOne", 
compensationMethod = "compensation")
   >     public boolean prepare(BusinessActionContext actionContext, 
@BusinessActionContextParameter(paramName = "a") int a) {
   > }
   > 
   > @Override
   >     public boolean compensation(BusinessActionContext actionContext) {
   > }
   > ```
   > 
   > 增加上述注解即可 name为资源名,定位到这个bean所需,故需要唯一值 
compensationMethod为二阶段决议回滚时触发的方法名,需要定义该方法在该bean中。
   
   
好的,多谢。再请教下是否也和tcc一样,二阶段也是由tc异步发起的?这里和tc的交互流程是否是,如果全局事务提交,那就直接结束,tc不会像tcc模式那样回调commit,因为没有,而如果是全局事务回滚,那就是tc会异步回调补偿方法,对吗?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to