WillemJiang commented on a change in pull request #77: add saga quick start
URL: https://github.com/apache/servicecomb-docs/pull/77#discussion_r243743677
##########
File path: saga-reference/zh_CN/quickstart.md
##########
@@ -0,0 +1,69 @@
+# Apache ServiceComb Pack
+Apache ServiceComb Pack QuickStart
+saga-servicecomb-demo中的Saga代码解读
+
+## 全局事务执行过程
+
+在SagaStartAnnotationProcessor
+Annotation被触发
+1 当Request发送请求
+2 调用preIntercept 发送 SagaStartedEvent 开始事务
+3 调用postIntercept 发送 SagaEndedEvent 事务结束执行
+
+compensableAnnotationProcessor执行补偿
+路径:servicecomb/saga/omega/transaction/
+
+### EnableOmega
+
+ ```
+ //BookingApplication Class
+ @EnableOmega
+ public class BookingApplication {
+ ```
+* 当EnableOmega签注生效时TransactionAspectConfig同时被实例化
+* TransactionAspectConfig中的sagaStartAspect方法,返回初始化的SagaStartAspect对象。
+*
SagaStartAspect在构造函数中初始化SagaStartAnnotationProcessor(参数:OmegaContext及SagaMessagerSende)
参考下面的代码:
+
+ ```
+//SagaStartAspect Class
+@Around("execution(@org.apache.servicecomb.saga.omega.context.annotations.SagaStart
* *(..)) && @annotation(sagaStart)")
Review comment:
这段代码是怎么被执行的?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services