You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/07/12 11:25:12 UTC

[shardingsphere] branch master updated: update yaml config for transaction (#19069)

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new eb1d581915f update yaml config for transaction (#19069)
eb1d581915f is described below

commit eb1d581915f41032adbb135e241069c6b4c88a13
Author: JingShang Lu <ji...@gmail.com>
AuthorDate: Tue Jul 12 19:25:05 2022 +0800

    update yaml config for transaction (#19069)
---
 .../yaml-config/rules/transaction.cn.md            | 49 ++++++++++++++++++++--
 .../yaml-config/rules/transaction.en.md            | 49 ++++++++++++++++++++--
 2 files changed, 90 insertions(+), 8 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.cn.md
index e6d84cffdda..e53dd23eb66 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.cn.md
@@ -3,19 +3,60 @@ title = "分布式事务"
 weight = 3
 +++
 
-## 配置项说明
+## 背景信息
+
+ShardingSphere 提供了三种模式的分布式事务 `LOCAL`, `XA`, `BASE`。
+
+## 参数解释
+
+- defaultType: 事务模式,可选值 `LOCAL`/`XA`/`BASE`
+- providerType: 指定模式下的具体实现
+
+## 操作步骤
+
+### 使用 LOCAL 模式
+
+server.yaml 配置文件内容如下:
 
-# 使用 LOCAL 事务
 ```yaml
 rules:
   - !TRANSACTION
     defaultType: LOCAL
 ```
 
-# 使用 XA 事务
+### 使用 XA 模式
+
+server.yaml 配置文件内容如下:
+
 ```yaml
 rules:
   - !TRANSACTION
     defaultType: XA
-    providerType: Narayana
+    providerType: Narayana/Atomikos 
+```
+手动添加 Narayana 相关依赖:
+
 ```
+jta-5.12.4.Final.jar
+arjuna-5.12.4.Final.jar
+common-5.12.4.Final.jar
+jboss-connector-api_1.7_spec-1.0.0.Final.jar
+jboss-logging-3.2.1.Final.jar
+jboss-transaction-api_1.2_spec-1.0.0.Alpha3.jar
+jboss-transaction-spi-7.6.0.Final.jar
+narayana-jts-integration-5.12.4.Final.jar
+shardingsphere-transaction-xa-narayana-x.x.x-SNAPSHOT.jar
+```
+
+### 使用 BASE 模式
+
+server.yaml 配置文件内容如下:
+
+```yaml
+rules:
+  - !TRANSACTION
+    defaultType: BASE
+    providerType: Seata 
+```
+
+搭建 Seata Server,添加相关配置文件,和 Seata 依赖,具体步骤参考 [ShardingSphere 集成 Seata 柔性事务](https://community.sphere-ex.com/t/topic/404)
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.en.md
index 912642ce898..094efb38fef 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/transaction.en.md
@@ -3,19 +3,60 @@ title = "Distributed Transaction"
 weight = 3
 +++
 
-## Configuration Item Explanation
+## Background
+
+ShardingSphere provides three modes for distributed transactions `LOCAL`, `XA`, `BASE`.
+
+## Parameters
+
+- defaultType: transaction mode, optional value `LOCAL`/`XA`/`BASE`.
+- providerType: specific implementation of the mode.
+
+## Procedure
+
+### Use LOCAL Mode
+
+The content of the server.yaml configuration file is as follows:
 
-LOCAL Model
 ```yaml
 rules:
   - !TRANSACTION
     defaultType: LOCAL
 ```
 
-XA Model
+### Use XA Mode
+
+The content of the server.yaml configuration file is as follows:
+
 ```yaml
 rules:
   - !TRANSACTION
     defaultType: XA
-    providerType: Narayana
+    providerType: Narayana/Atomikos 
+```
+To manually add Narayana-related dependencies:
+
 ```
+jta-5.12.4.Final.jar
+arjuna-5.12.4.Final.jar
+common-5.12.4.Final.jar
+jboss-connector-api_1.7_spec-1.0.0.Final.jar
+jboss-logging-3.2.1.Final.jar
+jboss-transaction-api_1.2_spec-1.0.0.Alpha3.jar
+jboss-transaction-spi-7.6.0.Final.jar
+narayana-jts-integration-5.12.4.Final.jar
+shardingsphere-transaction-xa-narayana-x.x.x-SNAPSHOT.jar
+```
+
+### Use BASE Mode
+
+The content of the server.yaml configuration file is as follows:
+
+```yaml
+rules:
+  - !TRANSACTION
+    defaultType: BASE
+    providerType: Seata 
+```
+
+Build a Seata Server, add relevant configuration files and Seata dependencies, see [ShardingSphere Integrates Seata Flexible Transactions](https://community.sphere-ex.com/t/topic/404)
\ No newline at end of file