File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
springboot-seata-tcc-sample Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,9 @@ Seata 事务模型包含了:TM(事务管理器),RM(资源管理器)
8888
8989 <img src =" https://raw.githubusercontent.com/ipipman/JavaSpringBootSamples/master/ReadmeMaterial/32361607671705_.pic_hd.jpg " width = " 700 " height = " 400 " alt =" 图片名称 " align =center />
9090
91- ###### Seata-TCC模式实战:核心代码
91+ ##### Seata-TCC模式实战:核心代码
9292
93- 1.TCC注册分支事务:@TwoPhaseBusinessAction 注解释用于标注这是一个TCC接口,会初始化TccActionInterceptor拦截器,用于注册分支事务(Branch Transaction)
93+ ###### 1.TCC注册分支事务:@TwoPhaseBusinessAction 注解释用于标注这是一个TCC接口,会初始化TccActionInterceptor拦截器,用于注册分支事务(Branch Transaction)
9494``` java
9595 /**
9696 * 第一个阶段:准备阶段
@@ -120,7 +120,7 @@ Seata 事务模型包含了:TM(事务管理器),RM(资源管理器)
120120 public boolean rollback(BusinessActionContext actionContext);
121121```
122122
123- 2.开启TCC全局事务:在Seata中TCC模式和AT模式一样,业务方需要使用@GlobalTransactional 注解来开启全局事务(Global Transaction),会初始化GlobalTransactionInterceptor拦截器,开启一个全局事务,获取全局的事务ID(即RootContext.getXID())
123+ ###### 2.开启TCC全局事务:在Seata中TCC模式和AT模式一样,业务方需要使用@GlobalTransactional 注解来开启全局事务(Global Transaction),会初始化GlobalTransactionInterceptor拦截器,开启一个全局事务,获取全局的事务ID(即RootContext.getXID())
124124``` java
125125 /**
126126 * 分布式事务提交demo
You can’t perform that action at this time.
0 commit comments