You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2021/09/25 06:36:29 UTC

[shardingsphere] branch master updated: Add xa-atomikos transaction configuration example for proxy. (#12695)

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

zhangliang 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 d58d97a  Add xa-atomikos transaction configuration example for proxy. (#12695)
d58d97a is described below

commit d58d97a1e1ad21be52ede839383d06e40292e5f9
Author: Guocheng Tang <to...@qq.com>
AuthorDate: Sat Sep 25 14:35:55 2021 +0800

    Add xa-atomikos transaction configuration example for proxy. (#12695)
---
 .../shardingsphere-proxy-memory-example/pom.xml    |   1 +
 .../pom.xml                                        |  16 ++--
 .../pom.xml                                        |  11 +--
 .../main/resources/conf/config-db-discovery.yaml   |  75 +++++++++++++++
 .../src/main/resources/conf/jta.properties         |  28 ++++++
 .../src/main/resources/conf/server.yaml            |  42 +++++++++
 .../pom.xml                                        |  11 +--
 .../src/main/resources/conf/config-encrypt.yaml    |  44 +++++++++
 .../src/main/resources/conf/jta.properties         |  28 ++++++
 .../src/main/resources/conf/server.yaml            |  42 +++++++++
 .../pom.xml                                        |  11 +--
 .../resources/conf/config-readwrite-splitting.yaml |  62 +++++++++++++
 .../src/main/resources/conf/jta.properties         |  28 ++++++
 .../src/main/resources/conf/server.yaml            |  42 +++++++++
 .../pom.xml                                        |  12 +--
 .../src/main/resources/conf/config-shadow.yaml     |  40 ++++++++
 .../src/main/resources/conf/jta.properties         |  28 ++++++
 .../src/main/resources/conf/server.yaml            |  42 +++++++++
 .../pom.xml                                        |  10 +-
 .../src/main/resources/conf/config-sharding.yaml   | 102 +++++++++++++++++++++
 .../src/main/resources/conf/jta.properties         |  28 ++++++
 .../src/main/resources/conf/server.yaml            |  42 +++++++++
 22 files changed, 698 insertions(+), 47 deletions(-)

diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
index 7121c32..9d83090 100644
--- a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
@@ -31,6 +31,7 @@
     
     <modules>
         <module>shardingsphere-proxy-memory-local-example</module>
+        <module>shardingsphere-proxy-memory-xa-atomikos-example</module>
     </modules>
     
 </project>
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/pom.xml
similarity index 70%
copy from examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
copy to examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/pom.xml
index 7121c32..685d52c 100644
--- a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/pom.xml
@@ -19,18 +19,22 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.shardingsphere.example</groupId>
-        <artifactId>shardingshpere-proxy-example</artifactId>
+        <artifactId>shardingsphere-proxy-memory-example</artifactId>
         <version>5.0.0-RC1-SNAPSHOT</version>
     </parent>
-    <artifactId>shardingsphere-proxy-memory-example</artifactId>
+    <modelVersion>4.0.0</modelVersion>
     <packaging>pom</packaging>
+    <artifactId>shardingsphere-proxy-memory-xa-atomikos-example</artifactId>
     <name>${project.artifactId}</name>
     
     <modules>
-        <module>shardingsphere-proxy-memory-local-example</module>
+        <module>shardingsphere-proxy-memory-xa-atomikos-sharding-example</module>
+        <module>shardingsphere-proxy-memory-xa-atomikos-db-discovery-example</module>
+        <module>shardingsphere-proxy-memory-xa-atomikos-encrypt-example</module>
+        <module>shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example</module>
+        <module>shardingsphere-proxy-memory-xa-atomikos-shadow-example</module>
     </modules>
-    
-</project>
+
+</project>
\ No newline at end of file
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/pom.xml
similarity index 83%
copy from examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
copy to examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/pom.xml
index 7121c32..e3e762b 100644
--- a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/pom.xml
@@ -22,15 +22,10 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.shardingsphere.example</groupId>
-        <artifactId>shardingshpere-proxy-example</artifactId>
+        <artifactId>shardingsphere-proxy-memory-xa-atomikos-example</artifactId>
         <version>5.0.0-RC1-SNAPSHOT</version>
     </parent>
-    <artifactId>shardingsphere-proxy-memory-example</artifactId>
-    <packaging>pom</packaging>
+    <artifactId>shardingsphere-proxy-memory-xa-atomikos-db-discovery-example</artifactId>
     <name>${project.artifactId}</name>
-    
-    <modules>
-        <module>shardingsphere-proxy-memory-local-example</module>
-    </modules>
-    
 </project>
+
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/config-db-discovery.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/ [...]
new file mode 100644
index 0000000..d7641ca
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/config-db-discovery.yaml
@@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+dataSources:
+  primary_ds_0:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:primary_ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+  primary_ds_0_replica_0:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:replica_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+  primary_ds_0_replica_1:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:replica_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+  primary_ds_1:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:primary_ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+  primary_ds_1_replica_0:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:replica_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+  primary_ds_1_replica_1:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:replica_ds_1;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+
+rules:
+  - !DB_DISCOVERY
+    dataSources:
+      ds_0:
+        dataSourceNames:
+          - primary_ds_0_replica_0
+          - primary_ds_0_replica_1
+        discoveryTypeName: mgr
+      ds_1:
+        dataSourceNames:
+          - primary_ds_1_replica_0
+          - primary_ds_1_replica_1
+        discoveryTypeName: mgr
+    discoveryTypes:
+      mgr:
+        type: MGR
+        props:
+          groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
+          zkServerLists: 'localhost:2181'
+          keepAliveCron: '0/5 * * * * ?'
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/jta.properties b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/jta.p [...]
new file mode 100644
index 0000000..7b37f0a
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/jta.properties
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# For more configuration rules, please refer to the official documentation of Atomikos.
+# https://www.atomikos.com/Documentation/JtaProperties
+
+com.atomikos.icatch.serial_jta_transactions = false
+com.atomikos.icatch.automatic_resource_registration = false
+com.atomikos.icatch.default_jta_timeout = 300000
+com.atomikos.icatch.max_actives = 10000
+com.atomikos.icatch.checkpoint_interval = 50000
+com.atomikos.icatch.enable_logging = true
+com.atomikos.icatch.log_base_name = xa_tx
+com.atomikos.icatch.log_base_dir = ./logs
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/server.yaml
new file mode 100644
index 0000000..30054e5
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-db-discovery-example/src/main/resources/conf/server.yaml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# You can get more configuration items about proxy conf from the following URL:
+# https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/configuration/
+
+# Memory mode is the default mode, you don’t need to configure it.
+mode:
+  type: Memory
+
+rules:
+  - !AUTHORITY
+    users:
+      - root@:root
+      - sharding@:sharding
+    provider:
+      type: NATIVE
+
+props:
+  max-connections-size-per-query: 1
+  executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-opentracing-enabled: false
+  proxy-hint-enabled: false
+  sql-show: false
+  check-table-metadata-enabled: false
+  sql-simple: false
+  check-duplicate-table-enabled: false
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/pom.xml
similarity index 83%
copy from examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
copy to examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/pom.xml
index 7121c32..9a8dfaf 100644
--- a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/pom.xml
@@ -22,15 +22,10 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.shardingsphere.example</groupId>
-        <artifactId>shardingshpere-proxy-example</artifactId>
+        <artifactId>shardingsphere-proxy-memory-xa-atomikos-example</artifactId>
         <version>5.0.0-RC1-SNAPSHOT</version>
     </parent>
-    <artifactId>shardingsphere-proxy-memory-example</artifactId>
-    <packaging>pom</packaging>
+    <artifactId>shardingsphere-proxy-memory-xa-atomikos-encrypt-example</artifactId>
     <name>${project.artifactId}</name>
-    
-    <modules>
-        <module>shardingsphere-proxy-memory-local-example</module>
-    </modules>
-    
 </project>
+
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/config-encrypt.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/config-enc [...]
new file mode 100644
index 0000000..747afd7
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/config-encrypt.yaml
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+schemaName: encrypt_db
+
+dataSources:
+  datasourceName:
+    url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+    minPoolSize: 1
+
+rules:
+  - !ENCRYPT
+    tables:
+      t_order:
+        columns:
+          columnName:
+            cipherColumn: cipher
+            encryptorName: encryptor
+    encryptors:
+      encryptor:
+        type: AES
+        props:
+          aes-key-value: 123456abc
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/jta.properties b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/jta.properties
new file mode 100644
index 0000000..7b37f0a
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/jta.properties
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# For more configuration rules, please refer to the official documentation of Atomikos.
+# https://www.atomikos.com/Documentation/JtaProperties
+
+com.atomikos.icatch.serial_jta_transactions = false
+com.atomikos.icatch.automatic_resource_registration = false
+com.atomikos.icatch.default_jta_timeout = 300000
+com.atomikos.icatch.max_actives = 10000
+com.atomikos.icatch.checkpoint_interval = 50000
+com.atomikos.icatch.enable_logging = true
+com.atomikos.icatch.log_base_name = xa_tx
+com.atomikos.icatch.log_base_dir = ./logs
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/server.yaml
new file mode 100644
index 0000000..30054e5
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-encrypt-example/src/main/resources/conf/server.yaml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# You can get more configuration items about proxy conf from the following URL:
+# https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/configuration/
+
+# Memory mode is the default mode, you don’t need to configure it.
+mode:
+  type: Memory
+
+rules:
+  - !AUTHORITY
+    users:
+      - root@:root
+      - sharding@:sharding
+    provider:
+      type: NATIVE
+
+props:
+  max-connections-size-per-query: 1
+  executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-opentracing-enabled: false
+  proxy-hint-enabled: false
+  sql-show: false
+  check-table-metadata-enabled: false
+  sql-simple: false
+  check-duplicate-table-enabled: false
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/pom.xml
similarity index 80%
copy from examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
copy to examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/pom.xml
index 7121c32..f0564d4 100644
--- a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/pom.xml
@@ -22,15 +22,8 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.shardingsphere.example</groupId>
-        <artifactId>shardingshpere-proxy-example</artifactId>
+        <artifactId>shardingsphere-proxy-memory-xa-atomikos-example</artifactId>
         <version>5.0.0-RC1-SNAPSHOT</version>
     </parent>
-    <artifactId>shardingsphere-proxy-memory-example</artifactId>
-    <packaging>pom</packaging>
-    <name>${project.artifactId}</name>
-    
-    <modules>
-        <module>shardingsphere-proxy-memory-local-example</module>
-    </modules>
-    
+    <artifactId>shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example</artifactId>
 </project>
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resources/conf/config-readwrite-splitting.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-exampl [...]
new file mode 100644
index 0000000..b541982
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resources/conf/config-readwrite-splitting.yaml
@@ -0,0 +1,62 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+schemaName: readwrite-splitting_db
+
+dataSources:
+  write_ds:
+    url: jdbc:mysql://127.0.0.1:3306/demo_write_ds?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+    minPoolSize: 1
+  read_ds_0:
+    url: jdbc:mysql://127.0.0.1:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+    minPoolSize: 1
+  read_ds_1:
+    url: jdbc:mysql://127.0.0.1:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+    minPoolSize: 1
+
+rules:
+  - !READWRITE_SPLITTING
+    dataSources:
+      pr_ds:
+        writeDataSourceName: write_ds
+        readDataSourceNames:
+          - read_ds_0
+          - read_ds_1
+        loadBalancerName: read_balance
+        queryConsistent: false
+
+    loadBalancers:
+      read_balance:
+        type: ROUND_ROBIN
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resources/conf/jta.properties b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resour [...]
new file mode 100644
index 0000000..7b37f0a
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resources/conf/jta.properties
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# For more configuration rules, please refer to the official documentation of Atomikos.
+# https://www.atomikos.com/Documentation/JtaProperties
+
+com.atomikos.icatch.serial_jta_transactions = false
+com.atomikos.icatch.automatic_resource_registration = false
+com.atomikos.icatch.default_jta_timeout = 300000
+com.atomikos.icatch.max_actives = 10000
+com.atomikos.icatch.checkpoint_interval = 50000
+com.atomikos.icatch.enable_logging = true
+com.atomikos.icatch.log_base_name = xa_tx
+com.atomikos.icatch.log_base_dir = ./logs
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resources [...]
new file mode 100644
index 0000000..30054e5
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-readwrite-splitting-example/src/main/resources/conf/server.yaml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# You can get more configuration items about proxy conf from the following URL:
+# https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/configuration/
+
+# Memory mode is the default mode, you don’t need to configure it.
+mode:
+  type: Memory
+
+rules:
+  - !AUTHORITY
+    users:
+      - root@:root
+      - sharding@:sharding
+    provider:
+      type: NATIVE
+
+props:
+  max-connections-size-per-query: 1
+  executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-opentracing-enabled: false
+  proxy-hint-enabled: false
+  sql-show: false
+  check-table-metadata-enabled: false
+  sql-simple: false
+  check-duplicate-table-enabled: false
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/pom.xml
similarity index 83%
copy from examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
copy to examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/pom.xml
index 7121c32..f0f2025 100644
--- a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/pom.xml
@@ -22,15 +22,11 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.shardingsphere.example</groupId>
-        <artifactId>shardingshpere-proxy-example</artifactId>
+        <artifactId>shardingsphere-proxy-memory-xa-atomikos-example</artifactId>
         <version>5.0.0-RC1-SNAPSHOT</version>
     </parent>
-    <artifactId>shardingsphere-proxy-memory-example</artifactId>
-    <packaging>pom</packaging>
+    <artifactId>shardingsphere-proxy-memory-xa-atomikos-shadow-example</artifactId>
     <name>${project.artifactId}</name>
-    
-    <modules>
-        <module>shardingsphere-proxy-memory-local-example</module>
-    </modules>
-    
 </project>
+
+
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/config-shadow.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/config-shadow.yaml
new file mode 100644
index 0000000..a320051
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/config-shadow.yaml
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+dataSources:
+  ds:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:primary_ds;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+  shadow_ds:
+    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+    driverClassName: org.h2.Driver
+    jdbcUrl: jdbc:h2:mem:replica_ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
+    username: sa
+    password:
+
+rules:
+  - !SHADOW
+    column: shadow
+    sourceDataSourceNames:
+      - ds
+      - ds1
+    shadowDataSourceNames:
+      - shadow_ds
+      - shadow_ds1
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/jta.properties b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/jta.properties
new file mode 100644
index 0000000..7b37f0a
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/jta.properties
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# For more configuration rules, please refer to the official documentation of Atomikos.
+# https://www.atomikos.com/Documentation/JtaProperties
+
+com.atomikos.icatch.serial_jta_transactions = false
+com.atomikos.icatch.automatic_resource_registration = false
+com.atomikos.icatch.default_jta_timeout = 300000
+com.atomikos.icatch.max_actives = 10000
+com.atomikos.icatch.checkpoint_interval = 50000
+com.atomikos.icatch.enable_logging = true
+com.atomikos.icatch.log_base_name = xa_tx
+com.atomikos.icatch.log_base_dir = ./logs
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/server.yaml
new file mode 100644
index 0000000..30054e5
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-shadow-example/src/main/resources/conf/server.yaml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# You can get more configuration items about proxy conf from the following URL:
+# https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/configuration/
+
+# Memory mode is the default mode, you don’t need to configure it.
+mode:
+  type: Memory
+
+rules:
+  - !AUTHORITY
+    users:
+      - root@:root
+      - sharding@:sharding
+    provider:
+      type: NATIVE
+
+props:
+  max-connections-size-per-query: 1
+  executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-opentracing-enabled: false
+  proxy-hint-enabled: false
+  sql-show: false
+  check-table-metadata-enabled: false
+  sql-simple: false
+  check-duplicate-table-enabled: false
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/pom.xml
similarity index 83%
copy from examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
copy to examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/pom.xml
index 7121c32..2fd83a5 100644
--- a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/pom.xml
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/pom.xml
@@ -22,15 +22,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.shardingsphere.example</groupId>
-        <artifactId>shardingshpere-proxy-example</artifactId>
+        <artifactId>shardingsphere-proxy-memory-xa-atomikos-example</artifactId>
         <version>5.0.0-RC1-SNAPSHOT</version>
     </parent>
-    <artifactId>shardingsphere-proxy-memory-example</artifactId>
-    <packaging>pom</packaging>
+    <artifactId>shardingsphere-proxy-memory-xa-atomikos-sharding-example</artifactId>
     <name>${project.artifactId}</name>
-    
-    <modules>
-        <module>shardingsphere-proxy-memory-local-example</module>
-    </modules>
-    
 </project>
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/config-sharding.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/config- [...]
new file mode 100644
index 0000000..b15f97c
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/config-sharding.yaml
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# You can get more configuration items about sharding from the following URL:
+# https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/configuration/yaml/sharding/#configuration-item-explanation
+
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+    minPoolSize: 1
+  ds_1:
+    url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
+    username: root
+    password:
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 50
+    minPoolSize: 1
+
+rules:
+  - !SHARDING
+    tables:
+      t_order:
+        actualDataNodes: ds_${0..1}.t_order_${0..1}
+        tableStrategy:
+          standard:
+            shardingColumn: order_id
+            shardingAlgorithmName: t_order_inline
+        keyGenerateStrategy:
+          column: order_id
+          keyGeneratorName: snowflake
+      t_order_item:
+        actualDataNodes: ds_${0..1}.t_order_item_${0..1}
+        tableStrategy:
+          standard:
+            shardingColumn: order_id
+            shardingAlgorithmName: t_order_item_inline
+        keyGenerateStrategy:
+          column: order_item_id
+          keyGeneratorName: snowflake
+    autoTables:
+      t_order_auto:
+        actualDataSources: ds_0
+        shardingStrategy:
+          standard:
+            shardingColumn: user_id
+            shardingAlgorithmName: t_order_inline
+    bindingTables:
+      - t_order,t_order_item
+    broadcastTables:
+      - t_address
+    defaultDatabaseStrategy:
+      standard:
+        shardingColumn: user_id
+        shardingAlgorithmName: database_inline
+    defaultTableStrategy:
+      none:
+    defaultKeyGenerateStrategy:
+      none:
+
+    shardingAlgorithms:
+      database_inline:
+        type: INLINE
+        props:
+          algorithm-expression: ds_${user_id % 2}
+      t_order_inline:
+        type: INLINE
+        props:
+          algorithm-expression: t_order_${order_id % 2}
+      t_order_item_inline:
+        type: INLINE
+        props:
+          algorithm-expression: t_order_item_${order_id % 2}
+
+    keyGenerators:
+      snowflake:
+        type: SNOWFLAKE
+        props:
+          worker-id: 123
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/jta.properties b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/jta.properties
new file mode 100644
index 0000000..7b37f0a
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/jta.properties
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# For more configuration rules, please refer to the official documentation of Atomikos.
+# https://www.atomikos.com/Documentation/JtaProperties
+
+com.atomikos.icatch.serial_jta_transactions = false
+com.atomikos.icatch.automatic_resource_registration = false
+com.atomikos.icatch.default_jta_timeout = 300000
+com.atomikos.icatch.max_actives = 10000
+com.atomikos.icatch.checkpoint_interval = 50000
+com.atomikos.icatch.enable_logging = true
+com.atomikos.icatch.log_base_name = xa_tx
+com.atomikos.icatch.log_base_dir = ./logs
diff --git a/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/server.yaml b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/server.yaml
new file mode 100644
index 0000000..30054e5
--- /dev/null
+++ b/examples/shardingsphere-sample/shardingshpere-proxy-example/shardingsphere-proxy-memory-example/shardingsphere-proxy-memory-xa-atomikos-example/shardingsphere-proxy-memory-xa-atomikos-sharding-example/src/main/resources/conf/server.yaml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# You can get more configuration items about proxy conf from the following URL:
+# https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/configuration/
+
+# Memory mode is the default mode, you don’t need to configure it.
+mode:
+  type: Memory
+
+rules:
+  - !AUTHORITY
+    users:
+      - root@:root
+      - sharding@:sharding
+    provider:
+      type: NATIVE
+
+props:
+  max-connections-size-per-query: 1
+  executor-size: 16  # Infinite by default.
+  proxy-frontend-flush-threshold: 128  # The default value is 128.
+  proxy-opentracing-enabled: false
+  proxy-hint-enabled: false
+  sql-show: false
+  check-table-metadata-enabled: false
+  sql-simple: false
+  check-duplicate-table-enabled: false