You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/05/17 06:24:16 UTC
[incubator-servicecomb-saga] branch master updated (bd32dea ->
1a7ea7c)
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git.
from bd32dea SCB-573 Split the docker-compose file for debugging easily (#190)
add c04a388 SCB-571 added the miss committed the test file
new 1a7ea7c SCB-452 Added some java doc
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/servicecomb/saga/omega/context/OmegaContext.java | 3 +++
.../org/apache/servicecomb/saga/omega/spring/EnableOmega.java | 5 +++++
.../saga/omega/transaction/annotations/Compensable.java | 3 ++-
.../src/test/java/SagaDubboConsumerFilterTest.java | 8 ++++----
4 files changed, 14 insertions(+), 5 deletions(-)
--
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.
[incubator-servicecomb-saga] 01/01: SCB-452 Added some java doc
Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
commit 1a7ea7cb065a027d51d477c8d8fcc5967ed33252
Author: Willem Jiang <ji...@huawei.com>
AuthorDate: Thu May 17 14:23:59 2018 +0800
SCB-452 Added some java doc
---
.../java/org/apache/servicecomb/saga/omega/context/OmegaContext.java | 3 +++
.../java/org/apache/servicecomb/saga/omega/spring/EnableOmega.java | 5 +++++
.../servicecomb/saga/omega/transaction/annotations/Compensable.java | 3 ++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/OmegaContext.java b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/OmegaContext.java
index daa8e7c..8b92868 100644
--- a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/OmegaContext.java
+++ b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/OmegaContext.java
@@ -17,6 +17,9 @@
package org.apache.servicecomb.saga.omega.context;
+/**
+ * OmegaContext holds the globalTxId and localTxId which are used to build the invocation map
+ */
public class OmegaContext {
public static final String GLOBAL_TX_ID_KEY = "X-Pack-Global-Transaction-Id";
public static final String LOCAL_TX_ID_KEY = "X-Pack-Local-Transaction-Id";
diff --git a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/EnableOmega.java b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/EnableOmega.java
index 7050d29..e94c39e 100644
--- a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/EnableOmega.java
+++ b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/EnableOmega.java
@@ -29,5 +29,10 @@ import org.apache.servicecomb.saga.omega.transaction.spring.TransactionAspectCon
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import({OmegaSpringConfig.class, TransactionAspectConfig.class})
+/**
+ * Indicates create the OmegaContext and inject it into the interceptors
+ * to pass the transactions id across the application.
+ * @see org.apache.servicecomb.saga.omega.context.OmegaContext
+ */
public @interface EnableOmega {
}
diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/Compensable.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/Compensable.java
index 78c4b91..b1f9319 100644
--- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/Compensable.java
+++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/Compensable.java
@@ -29,7 +29,8 @@ import java.lang.annotation.Target;
* <li>all parameters are serialized</li>
* <li>is idempotent</li>
* <li>the object instance which @Compensable method resides in should be stateless</li>
- * <li>if compensationMethod exists, both methods must be commutative, see this <a href="https://servicecomb.incubator.apache.org/docs/distributed_saga_2/">link</a>.</li>
+ * <li>if compensationMethod exists, both methods must be commutative, see this
+ * <a href="https://servicecomb.incubator.apache.org/docs/distributed_saga_2/">link</a>.</li>
* </ol>
*/
@Target(ElementType.METHOD)
--
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.