You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/05/28 13:12:53 UTC

[GitHub] WillemJiang closed pull request #185: [SCB-245]: add acceptance test for dubbo demo

WillemJiang closed pull request #185: [SCB-245]: add acceptance test for dubbo demo
URL: https://github.com/apache/incubator-servicecomb-saga/pull/185
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/acceptance-tests/acceptance-dubbo-demo/pom.xml b/acceptance-tests/acceptance-dubbo-demo/pom.xml
new file mode 100644
index 00000000..8dc7265e
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/pom.xml
@@ -0,0 +1,324 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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">
+    <parent>
+        <artifactId>acceptance-tests</artifactId>
+        <groupId>org.apache.servicecomb.saga</groupId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <name>Saga:Acceptance Tests::DubboDemo</name>
+    <artifactId>acceptance-dubbo-demo</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>docker.io/zookeeper</name>
+                                    <alias>zookeeper</alias>
+                                    <run>
+                                        <ports>
+                                            <port>zk.port:2181</port>
+                                        </ports>
+                                    </run>
+                                </image>
+                                <image>
+                                    <name>postgres</name>
+                                    <alias>postgres</alias>
+                                    <run>
+                                        <env>
+                                            <POSTGRES_DB>saga</POSTGRES_DB>
+                                            <POSTGRES_USER>saga</POSTGRES_USER>
+                                            <POSTGRES_PASSWORD>password</POSTGRES_PASSWORD>
+                                        </env>
+                                        <wait>
+                                            <log>database system is ready to accept connections</log>
+                                            <tcp>
+                                                <ports>
+                                                    <port>5432</port>
+                                                </ports>
+                                            </tcp>
+                                            <time>60000</time>
+                                        </wait>
+                                        <ports>
+                                            <port>postgres.port:5432</port>
+                                        </ports>
+                                    </run>
+                                </image>
+                                <image>
+                                    <name>alpha-server:${project.version}</name>
+                                    <alias>alpha</alias>
+                                    <run>
+                                        <env>
+                                            <JAVA_OPTS>
+                                                -Dspring.profiles.active=prd -Dspring.datasource.initialization-mode=always
+                                            </JAVA_OPTS>
+                                        </env>
+                                        <links>
+                                            <link>postgres:postgresql.servicecomb.io</link>
+                                        </links>
+                                        <wait>
+                                            <log>Started [a-zA-Z]+ in [0-9.]+ seconds</log>
+                                            <tcp>
+                                                <ports>
+                                                    <port>8080</port>
+                                                    <port>8090</port>
+                                                </ports>
+                                            </tcp>
+                                            <time>120000</time>
+                                        </wait>
+                                        <ports>
+                                            <port>alpha.port:8080</port>
+                                            <port>alpha.rest.port:8090</port>
+                                        </ports>
+                                        <dependsOn>
+                                            <container>postgres</container>
+                                        </dependsOn>
+                                    </run>
+                                </image>
+                                <image>
+                                    <name>servicea:${project.version}</name>
+                                    <alias>servicea</alias>
+                                    <run>
+                                        <env>
+                                            <JAVA_OPTS>
+                                                -Dspring.profiles.active=prd
+                                                -Dspring.datasource.url=jdbc:postgresql://postgresql.servicecomb.io:5432/saga
+                                                -Dspring.datasource.username=saga
+                                                -Dspring.datasource.password=password
+                                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                                -Dserver.port=8071
+                                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                                -Dspring.datasource.initialization-mode=always
+                                            </JAVA_OPTS>
+                                        </env>
+                                        <wait>
+                                            <log>Started [a-zA-Z]+ in [0-9.]+ seconds</log>
+                                            <tcp>
+                                                <ports>
+                                                    <port>8071</port>
+                                                </ports>
+                                            </tcp>
+                                            <time>120000</time>
+                                        </wait>
+                                        <links>
+                                            <link>postgres:postgresql.servicecomb.io</link>
+                                            <link>alpha:alpha-server.servicecomb.io</link>
+                                            <link>zookeeper:zookeeper.servicecomb.io</link>
+                                        </links>
+                                        <ports>
+                                            <port>servicea.port:8071</port>
+                                        </ports>
+                                        <dependsOn>
+                                            <container>postgres</container>
+                                            <container>alpha</container>
+                                            <container>zookeeper</container>
+                                        </dependsOn>
+                                    </run>
+                                </image>
+                                <image>
+                                    <name>serviceb:${project.version}</name>
+                                    <alias>serviceb</alias>
+                                    <run>
+                                        <env>
+                                            <JAVA_OPTS>
+                                                -Dspring.profiles.active=prd
+                                                -Dspring.datasource.url=jdbc:postgresql://postgresql.servicecomb.io:5432/saga
+                                                -Dspring.datasource.username=saga
+                                                -Dspring.datasource.password=password
+                                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                                -Dserver.port=8072
+                                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                                -Dspring.datasource.initialization-mode=always
+                                            </JAVA_OPTS>
+                                        </env>
+                                        <wait>
+                                            <log>Started [a-zA-Z]+ in [0-9.]+ seconds</log>
+                                            <tcp>
+                                                <ports>
+                                                    <port>8072</port>
+                                                </ports>
+                                            </tcp>
+                                            <time>120000</time>
+                                        </wait>
+                                        <links>
+                                            <link>postgres:postgresql.servicecomb.io</link>
+                                            <link>alpha:alpha-server.servicecomb.io</link>
+                                            <link>zookeeper:zookeeper.servicecomb.io</link>
+                                        </links>
+                                        <ports>
+                                            <port>serviceb.port:8072</port>
+                                        </ports>
+                                        <dependsOn>
+                                            <container>postgres</container>
+                                            <container>alpha</container>
+                                            <container>zookeeper</container>
+                                        </dependsOn>
+                                    </run>
+                                </image>
+                                <image>
+                                    <name>servicec:${project.version}</name>
+                                    <alias>servicec</alias>
+                                    <run>
+                                        <env>
+                                            <JAVA_OPTS>
+                                                -Dspring.profiles.active=prd
+                                                -Dspring.datasource.url=jdbc:postgresql://postgresql.servicecomb.io:5432/saga
+                                                -Dspring.datasource.username=saga
+                                                -Dspring.datasource.password=password
+                                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                                -Dserver.port=8073
+                                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                                -Dspring.datasource.initialization-mode=always
+                                            </JAVA_OPTS>
+                                        </env>
+                                        <wait>
+                                            <log>Started [a-zA-Z]+ in [0-9.]+ seconds</log>
+                                            <tcp>
+                                                <ports>
+                                                    <port>8073</port>
+                                                </ports>
+                                            </tcp>
+                                            <time>120000</time>
+                                        </wait>
+                                        <links>
+                                            <link>postgres:postgresql.servicecomb.io</link>
+                                            <link>alpha:alpha-server.servicecomb.io</link>
+                                            <link>zookeeper:zookeeper.servicecomb.io</link>
+                                        </links>
+                                        <ports>
+                                            <port>servicec.port:8073</port>
+                                        </ports>
+                                        <dependsOn>
+                                            <container>postgres</container>
+                                            <container>alpha</container>
+                                            <container>zookeeper</container>
+                                        </dependsOn>
+                                    </run>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>start</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>start</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>stop</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>stop</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.gmaven</groupId>
+                        <artifactId>gmaven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>add-default-properties</id>
+                                <phase>initialize</phase>
+                                <goals>
+                                    <goal>execute</goal>
+                                </goals>
+                                <configuration>
+                                    <source>
+                                        project.properties.setProperty('docker.hostname', 'localhost')
+                                        log.info("Docker hostname is " + project.properties['docker.hostname'])
+                                    </source>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <version>${maven.failsafe.version}</version>
+                        <configuration>
+                            <systemPropertyVariables>
+                                <alpha.cluster.address>
+                                    http://${docker.hostname}:${alpha.port}
+                                </alpha.cluster.address>
+                                <alpha.rest.address>
+                                    http://${docker.hostname}:${alpha.rest.port}
+                                </alpha.rest.address>
+                                <servicea.address>
+                                    http://${docker.hostname}:${servicea.port}
+                                </servicea.address>
+                                <serviceb.address>
+                                    http://${docker.hostname}:${serviceb.port}
+                                </serviceb.address>
+                                <servicec.address>
+                                    http://${docker.hostname}:${servicec.port}
+                                </servicec.address>
+                                <spring.datasource.url>
+                                    jdbc:postgresql://${docker.hostname}:${postgres.port}/saga?useSSL=false
+                                </spring.datasource.url>
+                                <info.service.uri>
+                                    ${info.service.uri}
+                                </info.service.uri>
+                            </systemPropertyVariables>
+                            <argLine>${jacoco.failsafe.argLine}</argLine>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>com.ethlo.persistence.tools</groupId>
+                        <artifactId>eclipselink-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+
+</project>
\ No newline at end of file
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
new file mode 100644
index 00000000..9b07486b
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/DubboDemoStepdefs.java
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+package org.apache.servicecomb.saga.acceptance.dubbodemo;
+
+import cucumber.api.DataTable;
+import cucumber.api.java.After;
+import cucumber.api.java.Before;
+import cucumber.api.java8.En;
+import io.restassured.response.Response;
+import org.hamcrest.core.StringContains;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.lang.invoke.MethodHandles;
+import java.util.*;
+import java.util.function.Consumer;
+
+import static io.restassured.RestAssured.given;
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.core.Is.is;
+
+public class DubboDemoStepdefs implements En {
+  private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+  private static final String ALPHA_REST_ADDRESS = "alpha.rest.address";
+  private static final String SERVICEA_ADDRESS = "servicea.address";
+  private static final String SERVICEB_ADDRESS = "serviceb.address";
+  private static final String SERVICEC_ADDRESS = "servicec.address";
+  private static final String INFO_SERVICE_URI = "info.service.uri";
+
+  private static final Consumer<Map<String, String>[]> NO_OP_CONSUMER = (dataMap) -> {
+  };
+
+  public DubboDemoStepdefs() {
+    Given("^ServiceA is up and running$", () -> {
+      probe(System.getProperty(SERVICEA_ADDRESS));
+    });
+
+    And("^ServiceB is up and running$", () -> {
+      probe(System.getProperty(SERVICEB_ADDRESS));
+    });
+
+    And("^ServiceC is up and running$", () -> {
+      probe(System.getProperty(SERVICEC_ADDRESS));
+    });
+
+    And("^Alpha is up and running$", () -> {
+      probe(System.getProperty(ALPHA_REST_ADDRESS));
+    });
+
+    When("^([A-Za-z]+) :: .*$", (invokeCode) -> {
+      LOG.info("invokeCode: " + invokeCode);
+
+      Response resp = given()
+          .pathParam("invokeCode", invokeCode)
+          .when()
+          .get(System.getProperty(SERVICEA_ADDRESS) + "/serviceInvoke/{invokeCode}");
+      LOG.info("response status code:" + resp.statusCode());
+      resp.then().content(new StringContains("check result: true"));
+    });
+
+    Then("^Alpha records the following events$", (DataTable dataTable) -> {
+      Consumer<Map<String, Object>[]> sortAndColumnStrippingConsumer = dataMaps -> {
+        //blur match: service for sagaEndedEvent may be unable to que
+        for(Map<String, Object> dataMap : dataMaps){
+          if(dataMap.values().contains("SagaEndedEvent")){
+            for(String key : dataMap.keySet()){
+              if("SagaEndedEvent".equals(dataMap.get(key))){
+                dataMap.put("serviceName", "*");
+                break;
+              }
+            }
+          }
+        }
+        //strip columns
+        for (Map<String, Object> map : dataMaps)
+          map.keySet().retainAll(dataTable.topCells());
+      };
+
+      dataMatches(System.getProperty(ALPHA_REST_ADDRESS) + "/events", dataTable, sortAndColumnStrippingConsumer);
+    });
+
+    And("^(service[a-c]+) success update status$", (String serviceName, DataTable dataTable) -> {
+      Consumer<Map<String, Object>[]> columnStrippingConsumer = dataMap -> {
+        for (Map<String, Object> map : dataMap)
+          map.keySet().retainAll(dataTable.topCells());
+      };
+
+      dataMatches(System.getProperty(SERVICEA_ADDRESS) + "/serviceInfo/"+serviceName, dataTable, columnStrippingConsumer);
+    });
+  }
+
+  @Before
+  public void cleanUp() {
+    LOG.info("Cleaning up services");
+
+    given()
+            .when()
+            .delete(System.getProperty(ALPHA_REST_ADDRESS) + "/events")
+            .then()
+            .statusCode(is(200));
+  }
+
+  @SuppressWarnings("unchecked")
+  private void dataMatches(String address, DataTable dataTable, Consumer<Map<String, Object>[]> dataProcessor) {
+    List<Map<String, Object>> expectedMaps = dataTable.asMaps(String.class, Object.class);
+    List<Map<String, Object>> actualMaps = new ArrayList<>();
+
+    await().atMost(8, SECONDS).until(() -> {
+      actualMaps.clear();
+      Collections.addAll(actualMaps, retrieveDataMaps(address, dataProcessor));
+
+      return expectedMaps.size() == actualMaps.size();
+    });
+
+    if (expectedMaps.isEmpty() && actualMaps.isEmpty()) {
+      return;
+    }
+
+    LOG.info("Retrieved data {} from service", actualMaps);
+    dataTable.unorderedDiff(DataTable.create(actualMaps));
+  }
+
+  @SuppressWarnings("unchecked")
+  private Map<String, Object>[] retrieveDataMaps(String address, Consumer<Map<String, Object>[]> dataProcessor) {
+    Map<String, Object>[] dataMap = given()
+        .when()
+        .get(address)
+        .then()
+        .statusCode(is(200))
+        .extract()
+        .body()
+        .as(Map[].class);
+
+    dataProcessor.accept(dataMap);
+    return dataMap;
+  }
+
+  private void probe(String address) {
+    String infoURI = System.getProperty(INFO_SERVICE_URI);
+    if (isEmpty(infoURI)) {
+      infoURI = "/info";
+    }
+    LOG.info("The info service uri is " + infoURI);
+    probe(address, infoURI);
+  }
+
+  private void probe(String address, String infoURI) {
+    LOG.info("Connecting to service address {}", address);
+    given()
+        .when()
+        .get(address + infoURI)
+        .then()
+        .statusCode(is(200));
+  }
+
+}
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/RunCucumberIT.java b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/RunCucumberIT.java
new file mode 100644
index 00000000..caf974ce
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/java/org/apache/servicecomb/saga/acceptance/dubbodemo/RunCucumberIT.java
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+package org.apache.servicecomb.saga.acceptance.dubbodemo;
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(plugin = {"pretty", "html:target/cucumber"},
+    features = "src/test/resources")
+public class RunCucumberIT {
+}
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AExceptionWhenAb_scenario.feature b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AExceptionWhenAb_scenario.feature
new file mode 100644
index 00000000..56220063
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AExceptionWhenAb_scenario.feature
@@ -0,0 +1,41 @@
+# 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.
+
+Feature: Alpha records transaction events
+
+  Scenario: A->B, A.run exception after A call B.run
+    Given ServiceA is up and running
+    And ServiceB is up and running
+    And Alpha is up and running
+
+    When AExceptionWhenAb :: A->B, A.run exception after A call B.run
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | servicea | SagaStartedEvent |
+      | servicea     | TxStartedEvent   |
+      | serviceb    | TxStartedEvent     |
+      | serviceb   | TxEndedEvent   |
+      | servicea   | TxAbortedEvent     |
+      | serviceb | TxCompensatedEvent   |
+      | * | SagaEndedEvent   |
+
+    And servicea success update status
+      | service | vstatus |
+      | servicea | init |
+
+    And serviceb success update status
+      | service | vstatus |
+      | serviceb | cancel |
\ No newline at end of file
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbAc_success_scenario.feature b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbAc_success_scenario.feature
new file mode 100644
index 00000000..bb8ed914
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbAc_success_scenario.feature
@@ -0,0 +1,47 @@
+# 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.
+
+Feature: Alpha records transaction events
+
+  Scenario: A->B, A->C success
+    Given ServiceA is up and running
+    And ServiceB is up and running
+    And ServiceC is up and running
+    And Alpha is up and running
+
+    When AbAc :: A->B, A->C, success
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | servicea | SagaStartedEvent |
+      | servicea     | TxStartedEvent   |
+      | serviceb    | TxStartedEvent     |
+      | serviceb | TxEndedEvent   |
+      | servicec | TxStartedEvent   |
+      | servicec | TxEndedEvent   |
+      | servicea | TxEndedEvent   |
+      | * | SagaEndedEvent   |
+
+    And servicea success update status
+      | service | vstatus |
+      | servicea | run |
+
+    And serviceb success update status
+      | service | vstatus |
+      | serviceb | run |
+
+    And servicec success update status
+      | service | vstatus |
+      | servicec | run |
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbBc_success_scenario.feature b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbBc_success_scenario.feature
new file mode 100644
index 00000000..4d3739e2
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/AbBc_success_scenario.feature
@@ -0,0 +1,47 @@
+# 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.
+
+Feature: Alpha records transaction events
+
+  Scenario: A->B, B->C, success
+    Given ServiceA is up and running
+    And ServiceB is up and running
+    And ServiceC is up and running
+    And Alpha is up and running
+
+    When AbBc :: A->B, B->C, success
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | servicea | SagaStartedEvent |
+      | servicea     | TxStartedEvent   |
+      | serviceb    | TxStartedEvent     |
+      | servicec | TxStartedEvent   |
+      | servicec | TxEndedEvent   |
+      | serviceb | TxEndedEvent   |
+      | servicea | TxEndedEvent   |
+      | * | SagaEndedEvent   |
+
+    And servicea success update status
+      | service | vstatus |
+      | servicea | run |
+
+    And serviceb success update status
+      | service | vstatus |
+      | serviceb | run |
+
+    And servicec success update status
+      | service | vstatus |
+      | servicec | run |
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/Ab_success_scenario.feature b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/Ab_success_scenario.feature
new file mode 100644
index 00000000..b3b1c6d2
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/Ab_success_scenario.feature
@@ -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.
+
+Feature: Alpha records transaction events
+
+  Scenario: A->B, success
+    Given ServiceA is up and running
+    And ServiceB is up and running
+    And Alpha is up and running
+
+    When Ab :: A->B, success
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | servicea | SagaStartedEvent |
+      | servicea     | TxStartedEvent   |
+      | serviceb    | TxStartedEvent     |
+      | serviceb   | TxEndedEvent   |
+      | servicea   | TxEndedEvent     |
+      | * | SagaEndedEvent   |
+
+    And servicea success update status
+      | service | vstatus |
+      | servicea | run |
+
+    And serviceb success update status
+      | service | vstatus |
+      | serviceb | run |
\ No newline at end of file
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/BExceptionWhenAb_scenario.feature b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/BExceptionWhenAb_scenario.feature
new file mode 100644
index 00000000..d0e295ec
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/BExceptionWhenAb_scenario.feature
@@ -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.
+
+Feature: Alpha records transaction events
+
+  Scenario: A->B, B.run exception
+    Given ServiceA is up and running
+    And ServiceB is up and running
+    And Alpha is up and running
+
+    When BExceptionWhenAb :: A->B, B.run exception
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | servicea | SagaStartedEvent |
+      | servicea     | TxStartedEvent   |
+      | serviceb    | TxStartedEvent     |
+      | serviceb   | TxAbortedEvent   |
+      | servicea   | TxAbortedEvent     |
+      | * | SagaEndedEvent   |
+
+    And servicea success update status
+      | service | vstatus |
+      | servicea | init |
+
+    And serviceb success update status
+      | service | vstatus |
+      | serviceb | init |
\ No newline at end of file
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/CExceptionWhenAbAc_scenario.feature b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/CExceptionWhenAbAc_scenario.feature
new file mode 100644
index 00000000..9c3bdc9e
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/CExceptionWhenAbAc_scenario.feature
@@ -0,0 +1,48 @@
+# 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.
+
+Feature: Alpha records transaction events
+
+  Scenario: A->B,A->C, C.run exception
+    Given ServiceA is up and running
+    And ServiceB is up and running
+    And ServiceC is up and running
+    And Alpha is up and running
+
+    When CExceptionWhenAbAc :: A->B,A->C, C.run exception
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | servicea | SagaStartedEvent |
+      | servicea     | TxStartedEvent   |
+      | serviceb    | TxStartedEvent     |
+      | serviceb | TxEndedEvent   |
+      | servicec | TxStartedEvent   |
+      | servicec | TxAbortedEvent   |
+      | servicea | TxAbortedEvent   |
+      | serviceb | TxCompensatedEvent   |
+      | * | SagaEndedEvent   |
+
+    And servicea success update status
+      | service | vstatus |
+      | servicea | init |
+
+    And serviceb success update status
+      | service | vstatus |
+      | serviceb | cancel |
+
+    And servicec success update status
+      | service | vstatus |
+      | servicec | init |
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/CExceptionWhenAbBc_scenario.feature b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/CExceptionWhenAbBc_scenario.feature
new file mode 100644
index 00000000..065a0cf8
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/CExceptionWhenAbBc_scenario.feature
@@ -0,0 +1,47 @@
+# 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.
+
+Feature: Alpha records transaction events
+
+  Scenario: A->B, B->C, C.run exception
+    Given ServiceA is up and running
+    And ServiceB is up and running
+    And ServiceC is up and running
+    And Alpha is up and running
+
+    When CExceptionWhenAbBc :: A->B, B->C, C.run exception
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | servicea | SagaStartedEvent |
+      | servicea     | TxStartedEvent   |
+      | serviceb    | TxStartedEvent     |
+      | servicec | TxStartedEvent   |
+      | servicec | TxAbortedEvent   |
+      | serviceb | TxAbortedEvent   |
+      | servicea | TxAbortedEvent   |
+      | * | SagaEndedEvent   |
+
+    And servicea success update status
+      | service | vstatus |
+      | servicea | init |
+
+    And serviceb success update status
+      | service | vstatus |
+      | serviceb | init |
+
+    And servicec success update status
+      | service | vstatus |
+      | servicec | init |
diff --git a/acceptance-tests/acceptance-dubbo-demo/src/test/resources/log4j2-test.xml b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/log4j2-test.xml
new file mode 100644
index 00000000..58924c68
--- /dev/null
+++ b/acceptance-tests/acceptance-dubbo-demo/src/test/resources/log4j2-test.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+    </Root>
+  </Loggers>
+</Configuration>
diff --git a/acceptance-tests/pom.xml b/acceptance-tests/pom.xml
index 51b4d862..572d949b 100644
--- a/acceptance-tests/pom.xml
+++ b/acceptance-tests/pom.xml
@@ -31,6 +31,7 @@
   <packaging>pom</packaging>
   <modules>
     <module>acceptance-pack</module>
+    <module>acceptance-dubbo-demo</module>
   </modules>
 
   <properties>
@@ -83,6 +84,13 @@
       <groupId>org.awaitility</groupId>
       <artifactId>awaitility</artifactId>
     </dependency>
+    <!--fix: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject-->
+    <dependency>
+      <groupId>org.codehaus.groovy</groupId>
+      <artifactId>groovy</artifactId>
+      <version>2.4.15</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/alpha/alpha-server/src/main/resources/schema-mysql.sql b/alpha/alpha-server/src/main/resources/schema-mysql.sql
index f0560cf2..85085df9 100644
--- a/alpha/alpha-server/src/main/resources/schema-mysql.sql
+++ b/alpha/alpha-server/src/main/resources/schema-mysql.sql
@@ -27,11 +27,12 @@ CREATE TABLE IF NOT EXISTS TxEvent (
   compensationMethod varchar(256) NOT NULL,
   expiryTime datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
   payloads varbinary(10240),
+  retries int(11) NOT NULL DEFAULT '0',
+  retryMethod varchar(256) DEFAULT NULL,
   PRIMARY KEY (surrogateId),
   INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime)
 ) DEFAULT CHARSET=utf8;
 
-
 CREATE TABLE IF NOT EXISTS Command (
   surrogateId bigint NOT NULL AUTO_INCREMENT,
   eventId bigint NOT NULL UNIQUE,
@@ -41,8 +42,6 @@ CREATE TABLE IF NOT EXISTS Command (
   localTxId varchar(36) NOT NULL,
   parentTxId varchar(36) DEFAULT NULL,
   compensationMethod varchar(256) NOT NULL,
-  retryMethod varchar(256) NOT NULL,
-  retries int NOT NULL DEFAULT 0,
   payloads varbinary(10240),
   status varchar(12),
   lastModified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -51,7 +50,6 @@ CREATE TABLE IF NOT EXISTS Command (
   INDEX saga_commands_index (surrogateId, eventId, globalTxId, localTxId, status)
 ) DEFAULT CHARSET=utf8;
 
-
 CREATE TABLE IF NOT EXISTS TxTimeout (
   surrogateId bigint NOT NULL AUTO_INCREMENT,
   eventId bigint NOT NULL UNIQUE,
diff --git a/omega/omega-transport/omega-transport-dubbo/pom.xml b/omega/omega-transport/omega-transport-dubbo/pom.xml
index 48071cf8..20d23bc0 100644
--- a/omega/omega-transport/omega-transport-dubbo/pom.xml
+++ b/omega/omega-transport/omega-transport-dubbo/pom.xml
@@ -27,12 +27,16 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
+    <properties>
+        <dubbo.version>2.6.1</dubbo.version>
+    </properties>
+
     <artifactId>omega-transport-dubbo</artifactId>
     <dependencies>
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>dubbo</artifactId>
-            <version>2.6.1</version>
+            <version>${dubbo.version}</version>
         </dependency>
     </dependencies>
 
diff --git a/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java b/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java
index 0a5f576a..1b953390 100644
--- a/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java
+++ b/omega/omega-transport/omega-transport-dubbo/src/test/java/SagaDubboProviderFilterTest.java
@@ -45,7 +45,6 @@
   @Before
   public void setUp() {
     omegaContext.clear();
-    ApplicationContext applicationContext = mock(ApplicationContext.class);
     when(applicationContext.containsBean("omegaContext")).thenReturn(true);
     when(applicationContext.getBean("omegaContext")).thenReturn(omegaContext);
     SpringExtensionFactory.addApplicationContext(applicationContext);
diff --git a/saga-demo/pom.xml b/saga-demo/pom.xml
index 10f27dbd..0c77b000 100644
--- a/saga-demo/pom.xml
+++ b/saga-demo/pom.xml
@@ -31,6 +31,7 @@
   <packaging>pom</packaging>
   <modules>
     <module>booking</module>
+    <module>saga-dubbo-demo</module>
   </modules>
 
   <dependencyManagement>
@@ -68,6 +69,11 @@
       <artifactId>spring-boot-starter-test</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.postgresql</groupId>
+      <artifactId>postgresql</artifactId>
+      <scope>runtime</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/saga-demo/saga-dubbo-demo/README.md b/saga-demo/saga-dubbo-demo/README.md
new file mode 100644
index 00000000..098fd853
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/README.md
@@ -0,0 +1,20 @@
+# Saga-dubbo-demo
+This demo including three services:
+* servicea
+* serviceb
+* servicec
+
+## Prerequisites
+You will need:
+1. [JDK 1.8][jdk]
+2. [Maven 3.x][maven]
+3. [alpha server][alpha_server]
+
+[jdk]: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
+[maven]: https://maven.apache.org/install.html
+[alpha_server]: https://github.com/apache/incubator-servicecomb-saga/tree/master/alpha
+
+## Running Demo
+1.mvn clean install -DskipTests -Pdocker
+2. ./saga-dubbo-demo.sh up
+
diff --git a/saga-demo/saga-dubbo-demo/docker-compose.mysql.yaml b/saga-demo/saga-dubbo-demo/docker-compose.mysql.yaml
new file mode 100644
index 00000000..6e0fcb7d
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/docker-compose.mysql.yaml
@@ -0,0 +1,127 @@
+## ---------------------------------------------------------------------------
+## 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 need to add mysql drive to alpha pom.xml and saga-dubbo-demo pom.xml first
+##
+version: '2.1'
+
+services:
+
+  zookeeper:
+    image: "docker.io/zookeeper"
+    hostname: zookeeper
+
+  database:
+      image: "mysql/mysql-server:5.7"
+      hostname: mysql
+      environment:
+        - MYSQL_ROOT_PASSWORD=password
+        - MYSQL_DATABASE=saga
+        - MYSQL_USER=saga
+        - MYSQL_PASSWORD=password
+      healthcheck:
+          test: ["CMD-SHELL", "nc -z localhost 3306 &> /dev/null; echo $$?"]
+          interval: 30s
+          timeout: 10s
+          retries: 5
+
+  alpha:
+    image: "alpha-server:${TAG}"
+    hostname: alpha-server
+    ports:
+      - "8081:8080"
+      - "8091:8090"
+    links:
+      - "database:mysql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=-Dspring.profiles.active=mysql
+    healthcheck:
+        test: ["CMD-SHELL", "nc -z localhost 8080 &> /dev/null; echo $$?"]
+        interval: 30s
+        timeout: 10s
+        retries: 5
+    depends_on:
+      database:
+        condition: service_healthy
+
+  servicea:
+    image: "servicea:${TAG}"
+    hostname: servicea
+    links:
+      - "zookeeper:zookeeper.servicecomb.io"
+      - "alpha:alpha-server.servicecomb.io"
+      - "database:mysql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=  -Dspring.profiles.active=mysql
+                                -Dspring.datasource.url=jdbc:mysql://mysql.servicecomb.io:3306/saga
+                                -Dspring.datasource.username=saga
+                                -Dspring.datasource.password=password
+                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                -Dserver.port=8071
+                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                -Dspring.datasource.initialization-mode=always
+    ports:
+      - "8071:8071"
+    depends_on:
+      alpha:
+        condition: service_healthy
+
+  serviceb:
+    image: "serviceb:${TAG}"
+    hostname: serviceb
+    links:
+      - "zookeeper:zookeeper.servicecomb.io"
+      - "alpha:alpha-server.servicecomb.io"
+      - "database:mysql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=  -Dspring.profiles.active=mysql
+                                -Dspring.datasource.url=jdbc:mysql://mysql.servicecomb.io:3306/saga
+                                -Dspring.datasource.username=saga
+                                -Dspring.datasource.password=password
+                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                -Dserver.port=8072
+                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                -Dspring.datasource.initialization-mode=always
+    ports:
+      - "8072:8072"
+    depends_on:
+      alpha:
+        condition: service_healthy
+
+  servicec:
+    image: "servicec:${TAG}"
+    hostname: servicec
+    links:
+      - "zookeeper:zookeeper.servicecomb.io"
+      - "alpha:alpha-server.servicecomb.io"
+      - "database:mysql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=  -Dspring.profiles.active=mysql
+                                -Dspring.datasource.url=jdbc:mysql://mysql.servicecomb.io:3306/saga
+                                -Dspring.datasource.username=saga
+                                -Dspring.datasource.password=password
+                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                -Dserver.port=8073
+                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                -Dspring.datasource.initialization-mode=always
+    ports:
+      - "8073:8073"
+    depends_on:
+      alpha:
+        condition: service_healthy
+
diff --git a/saga-demo/saga-dubbo-demo/docker-compose.yaml b/saga-demo/saga-dubbo-demo/docker-compose.yaml
new file mode 100644
index 00000000..b1e295ca
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/docker-compose.yaml
@@ -0,0 +1,124 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+version: '2.1'
+
+services:
+
+  zookeeper:
+    image: "docker.io/zookeeper"
+    hostname: zookeeper
+
+  database:
+    image: "postgres"
+    hostname: postgres
+    environment:
+      - POSTGRES_DB=saga
+      - POSTGRES_USER=saga
+      - POSTGRES_PASSWORD=password
+    ports:
+      - "5432:5432"
+    healthcheck:
+        test: ["CMD-SHELL", "nc -z localhost 5432 &> /dev/null; echo $$?"]
+        interval: 30s
+        timeout: 10s
+        retries: 5
+
+  alpha:
+    image: "alpha-server:${TAG}"
+    hostname: alpha-server
+    ports:
+      - "8081:8080"
+      - "8091:8090"
+    links:
+      - "database:postgresql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=-Dspring.profiles.active=prd
+    healthcheck:
+        test: ["CMD-SHELL", "nc -z localhost 8080 &> /dev/null; echo $$?"]
+        interval: 30s
+        timeout: 10s
+        retries: 5
+    depends_on:
+      database:
+        condition: service_healthy
+
+  servicea:
+    image: "servicea:${TAG}"
+    hostname: servicea
+    links:
+      - "zookeeper:zookeeper.servicecomb.io"
+      - "alpha:alpha-server.servicecomb.io"
+      - "database:postgresql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=  -Dspring.profiles.active=prd
+                                -Dspring.datasource.url=jdbc:postgresql://postgresql.servicecomb.io:5432/saga
+                                -Dspring.datasource.username=saga
+                                -Dspring.datasource.password=password
+                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                -Dserver.port=8071
+                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                -Dspring.datasource.initialization-mode=always
+    ports:
+      - "8071:8071"
+    depends_on:
+      alpha:
+        condition: service_healthy
+
+  serviceb:
+    image: "serviceb:${TAG}"
+    hostname: serviceb
+    links:
+      - "zookeeper:zookeeper.servicecomb.io"
+      - "alpha:alpha-server.servicecomb.io"
+      - "database:postgresql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=  -Dspring.profiles.active=prd
+                                -Dspring.datasource.url=jdbc:postgresql://postgresql.servicecomb.io:5432/saga
+                                -Dspring.datasource.username=saga
+                                -Dspring.datasource.password=password
+                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                -Dserver.port=8072
+                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                -Dspring.datasource.initialization-mode=always
+    ports:
+      - "8072:8072"
+    depends_on:
+      alpha:
+        condition: service_healthy
+
+  servicec:
+    image: "servicec:${TAG}"
+    hostname: servicec
+    links:
+      - "zookeeper:zookeeper.servicecomb.io"
+      - "alpha:alpha-server.servicecomb.io"
+      - "database:postgresql.servicecomb.io"
+    environment:
+      - JAVA_OPTS=  -Dspring.profiles.active=prd
+                                -Dspring.datasource.url=jdbc:postgresql://postgresql.servicecomb.io:5432/saga
+                                -Dspring.datasource.username=saga
+                                -Dspring.datasource.password=password
+                                -Dzookeeper.url=zookeeper.servicecomb.io:2181
+                                -Dserver.port=8073
+                                -Dalpha.cluster.address=alpha-server.servicecomb.io:8080
+                                -Dspring.datasource.initialization-mode=always
+    ports:
+      - "8073:8073"
+    depends_on:
+      alpha:
+        condition: service_healthy
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/pom.xml b/saga-demo/saga-dubbo-demo/pom.xml
new file mode 100644
index 00000000..a7d568bb
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/pom.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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">
+    <parent>
+        <artifactId>saga-demo</artifactId>
+        <groupId>org.apache.servicecomb.saga.demo</groupId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>saga-dubbo-demo</artifactId>
+    <name>Saga::Demo::Saga-dubbo-demo</name>
+    <packaging>pom</packaging>
+
+    <properties>
+        <saga.version>0.2.0-SNAPSHOT</saga.version>
+    </properties>
+
+    <modules>
+        <module>service-api</module>
+        <module>servicea</module>
+        <module>serviceb</module>
+        <module>servicec</module>
+        <module>service-pub</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring.boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>${maven-dependency-plugin.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga</groupId>
+            <artifactId>omega-transport-dubbo</artifactId>
+            <version>${saga.version} </version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga</groupId>
+            <artifactId>omega-spring-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga</groupId>
+            <artifactId>omega-transport-resttemplate</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+            <version>0.1</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j</artifactId>
+                    <groupId>log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-dbcp2</artifactId>
+            <version>2.1.1</version>
+        </dependency>
+        <!--<dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>-->
+    </dependencies>
+</project>
diff --git a/saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh b/saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh
new file mode 100755
index 00000000..6a9a9266
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/saga-dubbo-demo.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+service=saga-dubbo-demo
+
+show_usage() {
+  echo "Usage: $0 {up|up-mysql|down}" >&2
+}
+
+fetch_version() {
+  version="$(printf 'VER\t${project.version}' | mvn help:evaluate | grep '^VER' | cut -f2)"
+}
+
+if [[ -z $1 ]]; then
+  show_usage
+  exit 2
+fi
+
+case $1 in
+  up)
+    fetch_version
+    echo "Starting ${service}:${version}"
+    TAG=$version docker-compose up
+    exit $?
+  ;;
+  
+  up-mysql)
+    fetch_version
+    echo "Starting ${service}:${version}"
+    TAG=$version docker-compose -f docker-compose.mysql.yaml up
+    exit $?
+  ;;
+  
+  down)
+    fetch_version
+    echo "Stopping ${service}:${version}"
+    TAG=$version docker-compose down
+    exit $?
+  ;;
+  
+  *)
+    show_usage
+    exit 2
+  ;;
+esac
+
diff --git a/saga-demo/saga-dubbo-demo/service-api/pom.xml b/saga-demo/saga-dubbo-demo/service-api/pom.xml
new file mode 100644
index 00000000..36b0c58d
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-api/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga.demo</groupId>
+            <artifactId>service-pub</artifactId>
+            <version>0.2.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+    <parent>
+        <artifactId>saga-dubbo-demo</artifactId>
+        <groupId>org.apache.servicecomb.saga.demo</groupId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>service-api</artifactId>
+
+</project>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IService.java b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IService.java
new file mode 100644
index 00000000..12699818
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.api;
+
+import org.apache.servicecomb.saga.demo.dubbo.pub.InvokeContext;
+
+public interface IService {
+
+    public Object run(InvokeContext invokeContext) throws Exception;
+    public void cancelRun(InvokeContext invokeContext);
+
+}
diff --git a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceA.java b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceA.java
new file mode 100644
index 00000000..17ab38d9
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceA.java
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.api;
+
+public interface IServiceA extends IService{
+
+}
diff --git a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceB.java b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceB.java
new file mode 100644
index 00000000..15f734d5
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceB.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.api;
+
+import java.util.Map;
+
+public interface IServiceB extends IService{
+}
diff --git a/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceC.java b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceC.java
new file mode 100644
index 00000000..ef5acb80
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-api/src/main/java/org/apache/servicecomb/saga/demo/dubbo/api/IServiceC.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.api;
+
+import java.util.Map;
+
+public interface IServiceC extends IService{
+}
diff --git a/saga-demo/saga-dubbo-demo/service-api/src/main/resources/dubbo.properties b/saga-demo/saga-dubbo-demo/service-api/src/main/resources/dubbo.properties
new file mode 100644
index 00000000..b86f3005
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-api/src/main/resources/dubbo.properties
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+dubbo.application.qos.enable=false
+dubbo.application.qos.port=33333
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/service-pub/pom.xml b/saga-demo/saga-dubbo-demo/service-pub/pom.xml
new file mode 100644
index 00000000..1ca13102
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-pub/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<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">
+    <parent>
+        <artifactId>saga-dubbo-demo</artifactId>
+        <groupId>org.apache.servicecomb.saga.demo</groupId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>service-pub</artifactId>
+
+
+</project>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/AbsService.java b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/AbsService.java
new file mode 100644
index 00000000..16f56089
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/AbsService.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.pub;
+
+import org.springframework.jdbc.core.JdbcTemplate;
+
+import java.util.Map;
+
+public abstract class AbsService {
+
+    @javax.annotation.Resource(name = "jdbcTemplate")
+    protected JdbcTemplate jdbcTemplate;
+
+    public abstract String getServiceName();
+    public abstract String getTableName();
+
+    protected void doRunBusi() {
+        this.jdbcTemplate.update(String.format("update %s set vstatus=? where service = ?", getTableName()), "run", getServiceName());
+    }
+
+    protected void doCancelBusi() {
+        this.jdbcTemplate.update(String.format("update %s set vstatus=? where service = ?", getTableName()), "cancel", getServiceName());
+    }
+
+}
diff --git a/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/IInvokeCode.java b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/IInvokeCode.java
new file mode 100644
index 00000000..b7153acc
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/IInvokeCode.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.pub;
+
+/**
+ * a invoke code describe a test scenario
+* @date 05/05/2018 3:27 PM
+*/
+public interface IInvokeCode {
+
+    public static final String Ab_description="A->B, success";
+    public static final String Ab = "Ab";
+    public static final String AExceptionWhenAb_description="A->B, A.run exception after A call B.run";
+    public static final String AExceptionWhenAb="AExceptionWhenAb";
+    public static final String BExceptionWhenAb_description="A->B, B.run exception";
+    public static final String BExceptionWhenAb="BExceptionWhenAb";
+    public static final String AbAc_description="A->B, A->C success";
+    public static final String AbAc="AbAc";
+    public static final String CExceptionWhenAbAc_description="A->B,A->C, C.run exception";
+    public static final String CExceptionWhenAbAc="CExceptionWhenAbAc";
+    public static final String AbBc_description="A->B, B->C, success";
+    public static final String AbBc="AbBc";
+    public static final String CExceptionWhenAbBc_description="A->B, B->C, C.run exception";
+    public static final String CExceptionWhenAbBc="CExceptionWhenAbBc";
+}
diff --git a/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/InvokeContext.java b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/InvokeContext.java
new file mode 100644
index 00000000..82254474
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/InvokeContext.java
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.pub;
+
+public class InvokeContext implements java.io.Serializable{
+
+    private String invokeCode;
+
+    public String getInvokeCode() {
+        return invokeCode;
+    }
+
+    public InvokeContext setInvokeCode(String invokeCode) {
+        this.invokeCode = invokeCode;
+        return this;
+    }
+
+    public boolean isInvokeB(String serviceName) {
+        return "servicea".equals(serviceName) && (IInvokeCode.AExceptionWhenAb.equals(invokeCode)
+                || IInvokeCode.Ab.equals(invokeCode)
+                || IInvokeCode.BExceptionWhenAb.equals(invokeCode)
+                || IInvokeCode.AbAc.equals(invokeCode)
+                || IInvokeCode.CExceptionWhenAbAc.equals(invokeCode)
+                || IInvokeCode.AbBc.equals(invokeCode)
+                || IInvokeCode.CExceptionWhenAbBc.equals(invokeCode));
+    }
+
+    public boolean isInvokeC(String serviceName) {
+        return ("serviceb".equals(serviceName) && IInvokeCode.AbBc.equals(invokeCode))
+                || ("serviceb".equals(serviceName) && IInvokeCode.CExceptionWhenAbBc.equals(invokeCode))
+                || ("servicea".equals(serviceName) && IInvokeCode.AbAc.equals(invokeCode))
+                || ("servicea".equals(serviceName) && IInvokeCode.CExceptionWhenAbAc.equals(invokeCode));
+    }
+
+    public boolean isException(String serviceName) {
+        return ("servicea".equals(serviceName) && IInvokeCode.AExceptionWhenAb.equals(invokeCode))
+               || ("serviceb".equals(serviceName) && IInvokeCode.BExceptionWhenAb.equals(invokeCode))
+                || ("servicec".equals(serviceName) && (IInvokeCode.CExceptionWhenAbAc.equals(invokeCode)
+                || IInvokeCode.CExceptionWhenAbBc.equals(invokeCode)));
+    }
+
+}
diff --git a/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/ServiceVO.java b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/ServiceVO.java
new file mode 100644
index 00000000..ff53b787
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/service-pub/src/main/java/org/apache/servicecomb/saga/demo/dubbo/pub/ServiceVO.java
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.pub;
+
+public class ServiceVO {
+
+    private String id;
+    private String service;
+    private String vstatus;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getService() {
+        return service;
+    }
+
+    public void setService(String service) {
+        this.service = service;
+    }
+
+    public String getVstatus() {
+        return vstatus;
+    }
+
+    public void setVstatus(String vstatus) {
+        this.vstatus = vstatus;
+    }
+}
diff --git a/saga-demo/saga-dubbo-demo/servicea/pom.xml b/saga-demo/saga-dubbo-demo/servicea/pom.xml
new file mode 100644
index 00000000..33102df7
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/pom.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga.demo</groupId>
+            <artifactId>service-api</artifactId>
+            <version>${saga.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga.demo</groupId>
+            <artifactId>service-pub</artifactId>
+            <version>${saga.version}</version>
+        </dependency>
+    </dependencies>
+
+    <parent>
+        <groupId>org.apache.servicecomb.saga.demo</groupId>
+        <artifactId>saga-dubbo-demo</artifactId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>servicea</artifactId>
+
+    <build>
+        <plugins>
+            <!-- mixin plugin configurations declared in another pom,
+            just like importing dependencies managed in another pom -->
+            <plugin>
+                <groupId>com.github.odavid.maven.plugins</groupId>
+                <artifactId>mixin-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.commonjava.maven.plugins</groupId>
+                        <artifactId>directory-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>demo</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/ApplicationA.java b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/ApplicationA.java
new file mode 100644
index 00000000..ace9358e
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/ApplicationA.java
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.servicea;
+import org.apache.servicecomb.saga.omega.spring.EnableOmega;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ImportResource;
+
+@SpringBootApplication
+@EnableOmega
+@ImportResource({"dubbo-context.xml", "jdbc.xml"})
+public class ApplicationA {
+  public static void main(String[] args) {
+    SpringApplication.run(ApplicationA.class, args);
+  }
+}
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/ServiceA.java b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/ServiceA.java
new file mode 100644
index 00000000..dad5259f
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/ServiceA.java
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.servicea;
+
+import org.apache.servicecomb.saga.demo.dubbo.api.IServiceA;
+import org.apache.servicecomb.saga.demo.dubbo.api.IServiceB;
+import org.apache.servicecomb.saga.demo.dubbo.api.IServiceC;
+import org.apache.servicecomb.saga.demo.dubbo.pub.AbsService;
+import org.apache.servicecomb.saga.demo.dubbo.pub.InvokeContext;
+import org.apache.servicecomb.saga.omega.context.annotations.SagaStart;
+import org.apache.servicecomb.saga.omega.transaction.annotations.Compensable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.lang.invoke.MethodHandles;
+
+public class ServiceA extends AbsService implements IServiceA {
+
+    private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+    @Autowired
+    private IServiceB serviceB;
+
+    @Autowired
+    private IServiceC serviceC;
+
+    @Override
+    public String getServiceName() {
+        return "servicea";
+    }
+
+    @Override
+    public String getTableName() {
+        return "testa";
+    }
+
+    @Override
+    @SagaStart
+    @Compensable( compensationMethod="cancelRun")
+    @Transactional(rollbackFor = Exception.class)
+    public Object run(InvokeContext invokeContext) throws Exception {
+        LOG.info("A.run called");
+        doRunBusi();
+        if(invokeContext.isInvokeB(getServiceName())){
+            serviceB.run(invokeContext);
+        }
+        if(invokeContext.isInvokeC(getServiceName())){
+            serviceC.run(invokeContext);
+        }
+        if(invokeContext.isException(getServiceName()) ){
+            LOG.info("A.run exception");
+            throw new Exception("A.run exception");
+        }
+        return null;
+    }
+
+    public void cancelRun(InvokeContext invokeContext){
+        LOG.info("A.cancel called");
+        doCancelBusi();
+    }
+
+}
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/web/DubboDemoController.java b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/web/DubboDemoController.java
new file mode 100644
index 00000000..ef9981ac
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/web/DubboDemoController.java
@@ -0,0 +1,169 @@
+/*
+ * 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.
+ */
+
+package org.apache.servicecomb.saga.demo.dubbo.servicea.web;
+
+import org.apache.servicecomb.saga.demo.dubbo.api.IServiceA;
+import org.apache.servicecomb.saga.demo.dubbo.pub.IInvokeCode;
+import org.apache.servicecomb.saga.demo.dubbo.pub.InvokeContext;
+import org.apache.servicecomb.saga.demo.dubbo.pub.ServiceVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+public class DubboDemoController {
+
+  @Autowired
+  private IServiceA serviceA;
+
+    @javax.annotation.Resource(name = "jdbcTemplate")
+    protected JdbcTemplate jdbcTemplate;
+
+
+  @GetMapping("/serviceInvoke/Ab")
+  public String serviceInvokeAb() throws Exception {
+      serviceInvoke(IInvokeCode.Ab);
+      String status_a = getServiceStatus("testa");
+      String status_b = getServiceStatus("testb");
+      boolean checkResult = checkResult("run", status_a, "run", status_b);
+      return String.format(IInvokeCode.Ab_description +
+              "</br>check result: %s" +
+              "</br>expected status: A:run, B:run" +
+              "</br> actual status: A:%s, B:%s", checkResult, status_a, status_b);
+  }
+
+    private boolean checkResult(String... statusArray) {
+      for(int i=0; i<statusArray.length; i++){
+          if(i%2==0 && i<statusArray.length){
+              if(!statusArray[i].equals(statusArray[i+1])) return false;
+          }
+      }
+      return true;
+    }
+
+    @GetMapping("/serviceInvoke/AExceptionWhenAb")
+    public String serviceInvokeAExceptionWhenAb() throws Exception {
+        serviceInvoke(IInvokeCode.AExceptionWhenAb);
+        String status_a = getServiceStatus("testa");
+        String status_b = getServiceStatus("testb");
+        boolean checkResult = checkResult("init", status_a, "cancel", status_b);
+        return String.format(IInvokeCode.AExceptionWhenAb_description +
+                "</br>check result: %s" +
+                "</br>expected status: A:init, B:cancel" +
+                "</br> actual status: A:%s, B:%s", checkResult, status_a, status_b);
+    }
+
+    @GetMapping("/serviceInvoke/BExceptionWhenAb")
+    public String serviceInvokeBExceptionWhenAb() throws Exception {
+        serviceInvoke(IInvokeCode.BExceptionWhenAb);
+        String status_a = getServiceStatus("testa");
+        String status_b = getServiceStatus("testb");
+        boolean checkResult = checkResult("init", status_a, "init", status_b);
+        return String.format(IInvokeCode.BExceptionWhenAb_description +
+                "</br>check result: %s" +
+                "</br>expected status: A:init, B:init" +
+                "</br> actual status: A:%s, B:%s", checkResult, status_a, status_b);
+    }
+
+    @GetMapping("/serviceInvoke/AbAc")
+    public String serviceInvokeAbAc() throws Exception {
+        serviceInvoke(IInvokeCode.AbAc);
+        String status_a = getServiceStatus("testa");
+        String status_b = getServiceStatus("testb");
+        String status_c = getServiceStatus("testc");
+        boolean checkResult = checkResult("run", status_a, "run", status_b, "run", status_c);
+        return String.format(IInvokeCode.AbAc_description +
+                "</br>check result: %s" +
+                "</br>expected status: A:run, B:run, C:run" +
+                "</br> actual status: A:%s, B:%s, C: %s", checkResult, status_a, status_b, status_c);
+    }
+
+    @GetMapping("/serviceInvoke/CExceptionWhenAbAc")
+    public String serviceInvokeCExceptionWhenAbAc() throws Exception {
+        serviceInvoke(IInvokeCode.CExceptionWhenAbAc);
+        String status_a = getServiceStatus("testa");
+        String status_b = getServiceStatus("testb");
+        String status_c = getServiceStatus("testc");
+        boolean checkResult = checkResult("init", status_a, "cancel", status_b, "init", status_c);
+        return String.format(IInvokeCode.CExceptionWhenAbAc_description +
+                "</br>check result: %s" +
+                "</br>expected status: A:init, B:cancel, C:init" +
+                "</br> actual status: A:%s, B:%s, C: %s", checkResult, status_a, status_b, status_c);
+    }
+
+    @GetMapping("/serviceInvoke/AbBc")
+    public String serviceInvokeAbBc() throws Exception {
+        serviceInvoke(IInvokeCode.AbBc);
+        String status_a = getServiceStatus("testa");
+        String status_b = getServiceStatus("testb");
+        String status_c = getServiceStatus("testc");
+        boolean checkResult = checkResult("run", status_a, "run", status_b, "run", status_c);
+        return String.format(IInvokeCode.AbBc_description +
+                "</br>check result: %s" +
+                "</br>expected status: A:run, B:run, C:run" +
+                "</br> actual status: A:%s, B:%s, C: %s", checkResult, status_a, status_b, status_c);
+    }
+
+    @GetMapping("/serviceInvoke/CExceptionWhenAbBc")
+    public String serviceInvokeCExceptionWhenAbBc() throws Exception {
+        serviceInvoke(IInvokeCode.CExceptionWhenAbBc);
+        String status_a = getServiceStatus("testa");
+        String status_b = getServiceStatus("testb");
+        String status_c = getServiceStatus("testc");
+        boolean checkResult = checkResult("init", status_a, "init", status_b, "init", status_c);
+        return String.format(IInvokeCode.CExceptionWhenAbBc_description +
+                "</br>check result: %s" +
+                "</br>expected status: A:init, B:init, C:init" +
+                "</br> actual status: A:%s, B:%s, C: %s", checkResult, status_a, status_b, status_c);
+    }
+
+    @GetMapping("/serviceInfo/{serviceName}")
+    public List<ServiceVO> serviceInfo(@PathVariable String serviceName){
+      String tableName = "test"+serviceName.replace("service", "");
+        return this.jdbcTemplate.query("select * from " + tableName, new BeanPropertyRowMapper<>(ServiceVO.class));
+    }
+
+    public void serviceInvoke(String invokeCode) throws InterruptedException {
+        reset();
+        try{
+            serviceA.run(new InvokeContext().setInvokeCode(invokeCode));
+        }catch (Exception e){
+            e.printStackTrace();
+            //wait for compensate execute
+            Thread.sleep(1000);
+        }
+
+    }
+
+    public void reset() {
+        this.jdbcTemplate.update("update testa set vstatus=? ", "init");
+        this.jdbcTemplate.update("update testb set vstatus=? ", "init");
+        this.jdbcTemplate.update("update testc set vstatus=? ", "init");
+    }
+
+    public String getServiceStatus(String tableName){
+      return this.jdbcTemplate.queryForObject(String.format("select vstatus from %s", tableName), String.class);
+    }
+
+}
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/web/MvcConfigurer.java b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/web/MvcConfigurer.java
new file mode 100644
index 00000000..d815f607
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicea/web/MvcConfigurer.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.servicea.web;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.Ordered;
+import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+@Configuration
+public class MvcConfigurer extends WebMvcConfigurerAdapter {
+  
+    @Override  
+    public void addViewControllers(ViewControllerRegistry registry) {
+        registry.addViewController("/error").setViewName("error.html");  
+        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
+    }
+    
+    @Override  
+    public void configurePathMatch(PathMatchConfigurer configurer) {
+        super.configurePathMatch(configurer);  
+        configurer.setUseSuffixPatternMatch(false);  
+    }
+}
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/application.yaml b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/application.yaml
new file mode 100644
index 00000000..98d0b78f
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/application.yaml
@@ -0,0 +1,52 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+spring:
+  application:
+    name: servicea
+  profiles:
+    active: prd
+
+alpha:
+  cluster:
+    address: alpha-server.servicecomb.io:8080
+
+---
+spring:
+  profiles: prd
+  datasource:
+    username: saga
+    password: password
+    url: jdbc:postgresql://postgresql.servicecomb.io:5432/saga?useSSL=false
+    platform: postgresql
+
+---
+spring:
+  profiles: mysql
+  datasource:
+    username: saga
+    password: password
+    url: jdbc:mysql://mysql.servicecomb.io:3306/saga?useSSL=false
+    platform: mysql
+    continue-on-error: true
+  jpa:
+    properties:
+      eclipselink:
+        ddl-generation: none
+
+
+
+
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/dubbo-context.xml b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/dubbo-context.xml
new file mode 100644
index 00000000..1c73e907
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/dubbo-context.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+    <dubbo:application name="dubbo-servicea"/>
+    <dubbo:consumer check="false" timeout="10000" />
+    <!--localhost:2181-->
+    <dubbo:registry address="zookeeper://${zookeeper.url}?client=zkclient"/>
+    <dubbo:protocol name="dubbo" port="20881"/>
+    <dubbo:service interface="org.apache.servicecomb.saga.demo.dubbo.api.IServiceA" ref="servicea"/>
+    <bean id="servicea" class="org.apache.servicecomb.saga.demo.dubbo.servicea.ServiceA"/>
+    <dubbo:reference id="serviceb" interface="org.apache.servicecomb.saga.demo.dubbo.api.IServiceB"/>
+    <dubbo:reference id="servicec" interface="org.apache.servicecomb.saga.demo.dubbo.api.IServiceC"/>
+</beans>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/jdbc.xml b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/jdbc.xml
new file mode 100644
index 00000000..219e96a4
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/jdbc.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	   xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
+	   xmlns:tx="http://www.springframework.org/schema/tx"
+	   xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-3.1.xsd
+           http://www.springframework.org/schema/aop
+           http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
+           http://www.springframework.org/schema/tx
+           http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
+
+	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
+		<property name="dataSource" ref="dataSource" />
+	</bean>
+
+</beans>
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..eb57a2d0
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <AsyncRoot level="debug">
+      <AppenderRef ref="Console"/>
+    </AsyncRoot>
+  </Loggers>
+</Configuration>
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/schema-mysql.sql b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/schema-mysql.sql
new file mode 100644
index 00000000..91fc88ac
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/schema-mysql.sql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+CREATE TABLE `testa` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `service` varchar(128) DEFAULT NULL,
+  `vstatus` varchar(128) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+INSERT INTO `testa` (`id`, `service`, `vstatus`) VALUES ('1','servicea','init');
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/schema-postgresql.sql b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/schema-postgresql.sql
new file mode 100644
index 00000000..21c05cd5
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/schema-postgresql.sql
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+CREATE TABLE IF NOT EXISTS testa (
+  id BIGSERIAL PRIMARY KEY,
+  service varchar(128) NOT NULL,
+  vstatus varchar(36) NOT NULL
+);
+
+CREATE INDEX IF NOT EXISTS testa_index ON testa (id, service);
+
+INSERT INTO testa (id, service, vstatus) VALUES ('1','servicea','init');
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicea/src/main/resources/static/index.html b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/static/index.html
new file mode 100644
index 00000000..f366003d
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicea/src/main/resources/static/index.html
@@ -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.
+  -->
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta charset="utf-8">
+    <title>saga-dubbo-demo</title>
+    <meta name="description" content="">
+    <meta name="author" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <link rel="stylesheet" href="">
+    <!--[if lt IE 9]>
+    <script src="//cdn.jsdelivr.net/html5shiv/3.7.2/html5shiv.min.js"></script>
+    <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
+    <![endif]-->
+    <link rel="shortcut icon" href="">
+</head>
+<body>
+<p>1.<a href="/serviceInvoke/Ab" target="_blank">[A.run->B.run, success]</a> </p>
+<p>2.<a href="/serviceInvoke/AExceptionWhenAb" target="_blank">[A.run(x)->B.run, A.run exception after call B.run]</a> </p>
+<p>3.<a href="/serviceInvoke/BExceptionWhenAb" target="_blank">[A.run->B.run(x), B.run exception]</a> </p>
+<p>4.<a href="/serviceInvoke/AbAc" target="_blank">[A.run->B.run, A.run->C.run, success]</a> </p>
+<p>5.<a href="/serviceInvoke/CExceptionWhenAbAc" target="_blank">[A.run->B.run, A.run->C.run(x), C.run exception]</a> </p>
+<p>6.<a href="/serviceInvoke/AbBc" target="_blank">[A.run->B.run, B.run->C.run, success]</a></p>
+<p>7.<a href="/serviceInvoke/CExceptionWhenAbBc" target="_blank">[A.run->B.run, B.run->C.run(x), C.run exception]</a> </p>
+</body>
+</html>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/serviceb/pom.xml b/saga-demo/saga-dubbo-demo/serviceb/pom.xml
new file mode 100644
index 00000000..24712696
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga.demo</groupId>
+            <artifactId>service-api</artifactId>
+            <version>0.2.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <parent>
+        <groupId>org.apache.servicecomb.saga.demo</groupId>
+        <artifactId>saga-dubbo-demo</artifactId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>serviceb</artifactId>
+
+    <build>
+        <plugins>
+            <!-- mixin plugin configurations declared in another pom,
+            just like importing dependencies managed in another pom -->
+            <plugin>
+                <groupId>com.github.odavid.maven.plugins</groupId>
+                <artifactId>mixin-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.commonjava.maven.plugins</groupId>
+                        <artifactId>directory-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>demo</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/java/org/apache/servicecomb/saga/demo/dubbo/serviceb/ApplicationB.java b/saga-demo/saga-dubbo-demo/serviceb/src/main/java/org/apache/servicecomb/saga/demo/dubbo/serviceb/ApplicationB.java
new file mode 100644
index 00000000..e31c3753
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/java/org/apache/servicecomb/saga/demo/dubbo/serviceb/ApplicationB.java
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+package org.apache.servicecomb.saga.demo.dubbo.serviceb;
+
+import org.apache.servicecomb.saga.omega.spring.EnableOmega;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ImportResource;
+
+@SpringBootApplication
+@EnableOmega
+@ImportResource({"dubbo-context.xml", "jdbc.xml"})
+public class ApplicationB {
+  public static void main(String[] args) {
+    SpringApplication.run(ApplicationB.class, args);
+  }
+}
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/java/org/apache/servicecomb/saga/demo/dubbo/serviceb/ServiceB.java b/saga-demo/saga-dubbo-demo/serviceb/src/main/java/org/apache/servicecomb/saga/demo/dubbo/serviceb/ServiceB.java
new file mode 100644
index 00000000..0c7890f8
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/java/org/apache/servicecomb/saga/demo/dubbo/serviceb/ServiceB.java
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.serviceb;
+
+import org.apache.servicecomb.saga.demo.dubbo.api.IServiceB;
+import org.apache.servicecomb.saga.demo.dubbo.api.IServiceC;
+import org.apache.servicecomb.saga.demo.dubbo.pub.AbsService;
+import org.apache.servicecomb.saga.demo.dubbo.pub.InvokeContext;
+import org.apache.servicecomb.saga.omega.transaction.annotations.Compensable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.lang.invoke.MethodHandles;
+
+public class ServiceB extends AbsService implements IServiceB {
+
+    private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+    @Autowired
+    private IServiceC serviceC;
+
+    @Override
+    public String getServiceName() {
+        return "serviceb";
+    }
+
+    @Override
+    public String getTableName() {
+        return "testb";
+    }
+
+    @Override
+    @Compensable( compensationMethod="cancelRun")
+    @Transactional(rollbackFor = Exception.class)
+    public Object run(InvokeContext invokeContext) throws Exception {
+        LOG.info("B.run called");
+       doRunBusi();
+       if(invokeContext.isInvokeC(getServiceName())){
+           serviceC.run(invokeContext);
+       }
+        if(invokeContext.isException(getServiceName())){
+            throw new Exception("B.run exception");
+        }
+
+        return null;
+    }
+
+    public void cancelRun(InvokeContext invokeContext){
+        LOG.info("B.cancel called");
+        doCancelBusi();
+    }
+
+}
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/application.yaml b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/application.yaml
new file mode 100644
index 00000000..be1536a2
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/application.yaml
@@ -0,0 +1,45 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+spring:
+  application:
+    name: serviceb
+alpha:
+  cluster:
+    address: alpha-server.servicecomb.io:8080
+
+---
+spring:
+  profiles: prd
+  datasource:
+    username: saga
+    password: password
+    url: jdbc:postgresql://postgresql.servicecomb.io:5432/saga?useSSL=false
+    platform: postgresql
+
+---
+spring:
+  profiles: mysql
+  datasource:
+    username: saga
+    password: password
+    url: jdbc:mysql://mysql.servicecomb.io:3306/saga?useSSL=false
+    platform: mysql
+    continue-on-error: true
+  jpa:
+    properties:
+      eclipselink:
+        ddl-generation: none
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/dubbo-context.xml b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/dubbo-context.xml
new file mode 100644
index 00000000..519900ef
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/dubbo-context.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+    <dubbo:application name="dubbo-serviceb"/>
+    <dubbo:consumer check="false" timeout="10000" />
+    <!--localhost:2181-->
+    <dubbo:registry address="zookeeper://${zookeeper.url}?client=zkclient"/>
+    <dubbo:protocol name="dubbo" port="20882"/>
+    <dubbo:service interface="org.apache.servicecomb.saga.demo.dubbo.api.IServiceB" ref="serviceb"/>
+    <bean id="serviceb" class="org.apache.servicecomb.saga.demo.dubbo.serviceb.ServiceB"/>
+    <dubbo:reference id="servicec" interface="org.apache.servicecomb.saga.demo.dubbo.api.IServiceC"/>
+</beans>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/jdbc.xml b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/jdbc.xml
new file mode 100644
index 00000000..219e96a4
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/jdbc.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	   xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
+	   xmlns:tx="http://www.springframework.org/schema/tx"
+	   xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-3.1.xsd
+           http://www.springframework.org/schema/aop
+           http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
+           http://www.springframework.org/schema/tx
+           http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
+
+	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
+		<property name="dataSource" ref="dataSource" />
+	</bean>
+
+</beans>
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..eb57a2d0
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <AsyncRoot level="debug">
+      <AppenderRef ref="Console"/>
+    </AsyncRoot>
+  </Loggers>
+</Configuration>
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/schema-mysql.sql b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/schema-mysql.sql
new file mode 100644
index 00000000..2bc2a0c0
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/schema-mysql.sql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+CREATE TABLE `testb` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `service` varchar(128) DEFAULT NULL,
+  `vstatus` varchar(128) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+INSERT INTO `testb` (`id`, `service`, `vstatus`) VALUES ('2','serviceb','init');
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/schema-postgresql.sql b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/schema-postgresql.sql
new file mode 100644
index 00000000..a50781b7
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/serviceb/src/main/resources/schema-postgresql.sql
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+CREATE TABLE IF NOT EXISTS testb (
+  id BIGSERIAL PRIMARY KEY,
+  service varchar(128) NOT NULL,
+  vstatus varchar(36) NOT NULL
+);
+
+CREATE INDEX IF NOT EXISTS testb_index ON testb (id, service);
+
+INSERT INTO testb (id, service, vstatus) VALUES ('1','serviceb','init');
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicec/pom.xml b/saga-demo/saga-dubbo-demo/servicec/pom.xml
new file mode 100644
index 00000000..f15fe2ae
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicecomb.saga.demo</groupId>
+            <artifactId>service-api</artifactId>
+            <version>0.2.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <parent>
+        <groupId>org.apache.servicecomb.saga.demo</groupId>
+        <artifactId>saga-dubbo-demo</artifactId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>servicec</artifactId>
+
+    <build>
+        <plugins>
+            <!-- mixin plugin configurations declared in another pom,
+            just like importing dependencies managed in another pom -->
+            <plugin>
+                <groupId>com.github.odavid.maven.plugins</groupId>
+                <artifactId>mixin-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.commonjava.maven.plugins</groupId>
+                        <artifactId>directory-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>demo</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicec/ApplicationC.java b/saga-demo/saga-dubbo-demo/servicec/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicec/ApplicationC.java
new file mode 100644
index 00000000..4fdfe25b
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicec/ApplicationC.java
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.servicec;
+import org.apache.servicecomb.saga.omega.spring.EnableOmega;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ImportResource;
+
+@SpringBootApplication
+@EnableOmega
+@ImportResource({"dubbo-context.xml", "jdbc.xml"})
+public class ApplicationC {
+  public static void main(String[] args) {
+    SpringApplication.run(ApplicationC.class, args);
+  }
+}
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicec/ServiceC.java b/saga-demo/saga-dubbo-demo/servicec/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicec/ServiceC.java
new file mode 100644
index 00000000..1f8d63e4
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/java/org/apache/servicecomb/saga/demo/dubbo/servicec/ServiceC.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+package org.apache.servicecomb.saga.demo.dubbo.servicec;
+
+import org.apache.servicecomb.saga.demo.dubbo.api.IServiceC;
+import org.apache.servicecomb.saga.demo.dubbo.pub.AbsService;
+import org.apache.servicecomb.saga.demo.dubbo.pub.InvokeContext;
+import org.apache.servicecomb.saga.omega.transaction.annotations.Compensable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.lang.invoke.MethodHandles;
+
+public class ServiceC extends AbsService implements IServiceC {
+
+    private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+    @Override
+    public String getServiceName() {
+        return "servicec";
+    }
+
+    @Override
+    public String getTableName() {
+        return "testc";
+    }
+
+    @Override
+    @Compensable(compensationMethod="cancelRun")
+    @Transactional(rollbackFor = Exception.class)
+    public Object run(InvokeContext invokeContext) throws Exception {
+        LOG.info("C.run called");
+        doRunBusi();
+        if(invokeContext.isException(getServiceName()) ){
+            LOG.info("C.run exception");
+            throw new Exception("C.run exception");
+        }
+        return null;
+    }
+
+    public void cancelRun(InvokeContext invokeContext){
+        LOG.info("C.cancel called");
+        doCancelBusi();
+    }
+
+}
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/application.yaml b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/application.yaml
new file mode 100644
index 00000000..7b282f51
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/application.yaml
@@ -0,0 +1,45 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+spring:
+  application:
+    name: servicec
+alpha:
+  cluster:
+    address: alpha-server.servicecomb.io:8080
+
+---
+spring:
+  profiles: prd
+  datasource:
+    username: saga
+    password: password
+    url: jdbc:postgresql://postgresql.servicecomb.io:5432/saga?useSSL=false
+    platform: postgresql
+
+---
+spring:
+  profiles: mysql
+  datasource:
+    username: saga
+    password: password
+    url: jdbc:mysql://mysql.servicecomb.io:3306/saga?useSSL=false
+    platform: mysql
+    continue-on-error: true
+  jpa:
+    properties:
+      eclipselink:
+        ddl-generation: none
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/dubbo-context.xml b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/dubbo-context.xml
new file mode 100644
index 00000000..b37d8a4d
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/dubbo-context.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+    <dubbo:application name="dubbo-servicec"/>
+    <!--localhost:2181-->
+    <dubbo:registry address="zookeeper://${zookeeper.url}?client=zkclient"/>
+    <dubbo:protocol name="dubbo" port="20883"/>
+    <dubbo:service interface="org.apache.servicecomb.saga.demo.dubbo.api.IServiceC" ref="servicec"/>
+    <bean id="servicec" class="org.apache.servicecomb.saga.demo.dubbo.servicec.ServiceC"/>
+</beans>
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/jdbc.xml b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/jdbc.xml
new file mode 100644
index 00000000..219e96a4
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/jdbc.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	   xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
+	   xmlns:tx="http://www.springframework.org/schema/tx"
+	   xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-3.1.xsd
+           http://www.springframework.org/schema/aop
+           http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
+           http://www.springframework.org/schema/tx
+           http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
+
+	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
+		<property name="dataSource" ref="dataSource" />
+	</bean>
+
+</beans>
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml
new file mode 100644
index 00000000..eb57a2d0
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<Configuration status="WARN">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </Appenders>
+  <Loggers>
+    <AsyncRoot level="debug">
+      <AppenderRef ref="Console"/>
+    </AsyncRoot>
+  </Loggers>
+</Configuration>
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/schema-mysql.sql b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/schema-mysql.sql
new file mode 100644
index 00000000..8a32eae5
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/schema-mysql.sql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+CREATE TABLE `testc` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `service` varchar(128) DEFAULT NULL,
+  `vstatus` varchar(128) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+INSERT INTO `testc` (`id`, `service`, `vstatus`) VALUES ('3','servicec','init');
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/servicec/src/main/resources/schema-postgresql.sql b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/schema-postgresql.sql
new file mode 100644
index 00000000..58f27dc6
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/servicec/src/main/resources/schema-postgresql.sql
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+CREATE TABLE IF NOT EXISTS testc (
+  id BIGSERIAL PRIMARY KEY,
+  service varchar(128) NOT NULL,
+  vstatus varchar(36) NOT NULL
+);
+
+CREATE INDEX IF NOT EXISTS testc_index ON testc (id, service);
+
+INSERT INTO testc (id, service, vstatus) VALUES ('1','servicec','init');
\ No newline at end of file
diff --git a/saga-demo/saga-dubbo-demo/sql/schema-mysql.sql b/saga-demo/saga-dubbo-demo/sql/schema-mysql.sql
new file mode 100644
index 00000000..d9d07437
--- /dev/null
+++ b/saga-demo/saga-dubbo-demo/sql/schema-mysql.sql
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+create database saga_dubbo;
+use saga_dubbo;
+
+CREATE TABLE `testa` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `service` varchar(128) DEFAULT NULL,
+  `vstatus` varchar(128) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+INSERT INTO `testa` (`id`, `service`, `vstatus`) VALUES ('1','servicea','init');
+
+CREATE TABLE `testb` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `service` varchar(128) DEFAULT NULL,
+  `vstatus` varchar(128) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+INSERT INTO `testb` (`id`, `service`, `vstatus`) VALUES ('2','serviceb','init');
+
+CREATE TABLE `testc` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `service` varchar(128) DEFAULT NULL,
+  `vstatus` varchar(128) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+INSERT INTO `testc` (`id`, `service`, `vstatus`) VALUES ('3','servicec','init');
\ No newline at end of file


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services