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/servicecomb-pack.git
commit 6428bfb3eeeb01a5c26350f45242dc78e5198f6c Author: Daniel Qian <[email protected]> AuthorDate: Tue Jul 23 11:55:48 2019 +0800 SCB-1389 polish doc --- docs/user_guide.md | 11 +++++------ docs/user_guide_zh.md | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/user_guide.md b/docs/user_guide.md index 21d4767..c434121 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -155,7 +155,7 @@ Service A: ```java @SagaStart public void foo(BarCommand cmd) { - TransactionContext txContext = OmegaContext.getTransactionContext(); + TransactionContext txContext = omegaContext.getTransactionContext(); someRpc.send(cmd, txContext); } ``` @@ -169,7 +169,7 @@ public void listen(BarCommand cmd, TransactionContext parentTxContext) { @Compensable public void bar(BarCommand cmd, TransactionContext parentTxContext) { ... - // TransactionContext childTxContext = OmegaContext.getTransactionContext(); + // TransactionContext childTxContext = omegaContext.getTransactionContext(); } ``` @@ -188,10 +188,9 @@ public class BarCommandWithTxContext } @SagaStart public void foo(BarCommand cmd) { - TransactionContext txContext = OmegaContext.getTransactionContext(); BarCommandWithTxContext cmdWithTxContext = new BarCommandWithTxContext(cmd); - cmdWithTxContext.setGlobalTxId(txContext.globalTxId()); - cmdWithTxContext.setLocalTxId(txContext.localTxId()); + cmdWithTxContext.setGlobalTxId(omegaContext.globalTxId()); + cmdWithTxContext.setLocalTxId(omegaContext.localTxId()); someRpc.send(cmdWithTxContext); } ``` @@ -206,7 +205,7 @@ public void listen(BarCommandWithTxContext cmdWithTxContext) { @Compensable public void bar(BarCommandWithTxContext cmdWithTxContext) { ... - // TransactionContext childTxContext = OmegaContext.getTransactionContext(); + // TransactionContext childTxContext = omegaContext.getTransactionContext(); } ``` diff --git a/docs/user_guide_zh.md b/docs/user_guide_zh.md index 85a2031..3997f3a 100644 --- a/docs/user_guide_zh.md +++ b/docs/user_guide_zh.md @@ -155,7 +155,7 @@ Service A: ```java @SagaStart public void foo(BarCommand cmd) { - TransactionContext txContext = OmegaContext.getTransactionContext(); + TransactionContext txContext = omegaContext.getTransactionContext(); someRpc.send(cmd, txContext); } ``` @@ -188,10 +188,9 @@ public class BarCommandWithTxContext } @SagaStart public void foo(BarCommand cmd) { - TransactionContext txContext = OmegaContext.getTransactionContext(); BarCommandWithTxContext cmdWithTxContext = new BarCommandWithTxContext(cmd); - cmdWithTxContext.setGlobalTxId(txContext.globalTxId()); - cmdWithTxContext.setLocalTxId(txContext.localTxId()); + cmdWithTxContext.setGlobalTxId(omegaContext.globalTxId()); + cmdWithTxContext.setLocalTxId(omegaContext.localTxId()); someRpc.send(cmdWithTxContext); } ``` @@ -206,7 +205,7 @@ public void listen(BarCommandWithTxContext cmdWithTxContext) { @Compensable public void bar(BarCommandWithTxContext cmdWithTxContext) { ... - // TransactionContext childTxContext = OmegaContext.getTransactionContext(); + // TransactionContext childTxContext = omegaContext.getTransactionContext(); } ```
