You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/08/22 08:21:43 UTC

[incubator-servicecomb-saga] branch master updated (0e3593e -> 4c8b15f)

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

ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git.


    from 0e3593e  [SCB-745] Applying Builder Pattern on AlphaClusterConfig. - Extending AlphaClusterConfig by adding MessageHandler, MessageSerializer and MessageDeserializer property. - Refactoring the constructor of LoadBalancedClusterMessageSender. - Modifying respective test cases and references. - Killing some issue detected by SonarLint.
     new 11dff7b  Add the debugging method in spring-demo's document.
     new f375c61  Add the ref to debugging in other demos' documents.
     new 4c8b15f  Add the ref to debugging in root document's quick start section.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                            |  1 +
 README_ZH.md                                         |  1 +
 saga-demo/conditional-transaction-demo/README.md     |  3 +++
 saga-demo/dependency-free-transaction-demo/README.md |  3 +++
 saga-demo/saga-dubbo-demo/README.md                  |  8 ++++++--
 saga-demo/saga-servicecomb-demo/README.md            |  5 ++++-
 saga-demo/saga-spring-demo/README.md                 | 18 ++++++++++++++++++
 7 files changed, 36 insertions(+), 3 deletions(-)


[incubator-servicecomb-saga] 03/03: Add the ref to debugging in root document's quick start section.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit 4c8b15f90a865384535f0ee154c271b4753f453a
Author: Zhen Ju <ju...@huawei.com>
AuthorDate: Wed Aug 22 16:15:11 2018 +0800

    Add the ref to debugging in root document's quick start section.
---
 README.md    | 1 +
 README_ZH.md | 1 +
 2 files changed, 2 insertions(+)

diff --git a/README.md b/README.md
index eb009f4..48ca2ad 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ See [Saga Pack Design](docs/design.md) for details.
 * For ServiceComb Java Chassis application, please see [Booking Demo](saga-demo/saga-servicecomb-demo/README.md) for details.
 * For Spring applications, please see [Booking Demo](saga-demo/saga-spring-demo/README.md) for details.
 * For Dubbo applications, please see [Dubbo Demo](saga-demo/saga-dubbo-demo/README.md) for details.
+* To debug the applications, please see [Spring Demo Debugging](saga-demo/saga-spring-demo#debugging) for details.
 
 ## Build and Run the tests from source
 * Build the source code and run the tests
diff --git a/README_ZH.md b/README_ZH.md
index 0531441..200086f 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -27,6 +27,7 @@ Saga是由 **alpha** 和 **omega**组成,其中:
 * Saga在ServiceComb Java Chassis应用可以参考[出行预订](saga-demo/saga-servicecomb-demo/README.md)
 * Saga在Spring应用的用法可参考[出行预订示例](saga-demo/saga-spring-demo/README.md)。
 * Saga在Dubbo应用的用法可参考[Dubbo示例](saga-demo/saga-dubbo-demo/README.md).
+* Saga的调试方法可以参考[调试Spring示例](saga-demo/saga-spring-demo#debugging).
 
 ## 编译和运行代码
 * 编译代码并且运行相关的单元测试


[incubator-servicecomb-saga] 01/03: Add the debugging method in spring-demo's document.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit 11dff7bfe9bede80e6b897fd9f4e05c8f6fea8f9
Author: Zhen Ju <ju...@huawei.com>
AuthorDate: Wed Aug 22 16:13:44 2018 +0800

    Add the debugging method in spring-demo's document.
---
 saga-demo/saga-spring-demo/README.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/saga-demo/saga-spring-demo/README.md b/saga-demo/saga-spring-demo/README.md
index a5c7b5a..0502493 100644
--- a/saga-demo/saga-spring-demo/README.md
+++ b/saga-demo/saga-spring-demo/README.md
@@ -125,3 +125,21 @@ The second car booking will be marked with **cancel:true**
 Open a browser with URL http://127.0.0.1:8083, You will get a html page. You can use this page to invoke test cases, and then get results.
 
 **Note** transactions and compensations implemented by services must be idempotent.
+
+## Debugging
+
+To debug the services of the demo, just add debug parameter to JVM through the environment field in docker-compose configs. Let's take alpha-server as an example:
+
+```yaml
+alpha:
+  image: "alpha-server:${TAG}"
+  environment:
+    - JAVA_OPTS=-Dspring.profiles.active=prd -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
+  ports:
+    - "6006:5005"
+...
+```
+
+We append the debug parameter `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005` to the JAVA_OPTS environment variable, the Java process inside the container will listen on port 5005. With the port forwarding rule `6006:5005`, when alpha-server is ready, we can connect to port 6006 on the host and start debugging alpha-server.
+
+If  you're using [IntelliJ](https://www.jetbrains.com/idea/), open the saga project, create a new debug configuration with template 'Remote', fill "Host" and "Port" input with "localhost" and "6006", then select "alpha" in the drop-down list of "Use classpath of module". When alpha-server is running, hit shift+f9 to debug the remote application.


[incubator-servicecomb-saga] 02/03: Add the ref to debugging in other demos' documents.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit f375c613d3e6916287149a5b7066d8cdf89ed495
Author: Zhen Ju <ju...@huawei.com>
AuthorDate: Wed Aug 22 16:14:41 2018 +0800

    Add the ref to debugging in other demos' documents.
---
 saga-demo/conditional-transaction-demo/README.md     | 3 +++
 saga-demo/dependency-free-transaction-demo/README.md | 3 +++
 saga-demo/saga-dubbo-demo/README.md                  | 8 ++++++--
 saga-demo/saga-servicecomb-demo/README.md            | 5 ++++-
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/saga-demo/conditional-transaction-demo/README.md b/saga-demo/conditional-transaction-demo/README.md
index 9ae1deb..505a666 100755
--- a/saga-demo/conditional-transaction-demo/README.md
+++ b/saga-demo/conditional-transaction-demo/README.md
@@ -172,3 +172,6 @@ So the 2<sup>nd</sup> request will trigger product replenishment from supplier.
 for simplicity.
 
 To see all events generated by Saga, visit `http://<docker.host.ip>:8083/events` with postman.
+
+## Debugging
+Take the [spring-demo debugging](../saga-spring-demo#debugging) as a reference.
diff --git a/saga-demo/dependency-free-transaction-demo/README.md b/saga-demo/dependency-free-transaction-demo/README.md
index 611dfa5..4fb6e0f 100755
--- a/saga-demo/dependency-free-transaction-demo/README.md
+++ b/saga-demo/dependency-free-transaction-demo/README.md
@@ -166,3 +166,6 @@ Sending the request more than once will trigger compensation due to insufficient
 for simplicity.
 
 To see all events generated by Saga, visit `http://<docker.host.ip>:8083/events` with browser.
+
+## Debugging
+Take the [spring-demo debugging](../saga-spring-demo#debugging) as a reference.
diff --git a/saga-demo/saga-dubbo-demo/README.md b/saga-demo/saga-dubbo-demo/README.md
index 098fd85..deadb4f 100644
--- a/saga-demo/saga-dubbo-demo/README.md
+++ b/saga-demo/saga-dubbo-demo/README.md
@@ -15,6 +15,10 @@ You will need:
 [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
+```bash
+$ mvn clean install -DskipTests -Pdocker
+$ ./saga-dubbo-demo.sh up
+```
 
+## Debugging
+Take the [spring-demo debugging](../saga-spring-demo#debugging) as a reference.
diff --git a/saga-demo/saga-servicecomb-demo/README.md b/saga-demo/saga-servicecomb-demo/README.md
index f9cd821..e08b416 100644
--- a/saga-demo/saga-servicecomb-demo/README.md
+++ b/saga-demo/saga-servicecomb-demo/README.md
@@ -58,4 +58,7 @@ Check the car booking status with
 ```
 curl http://${host_address}:8082/bookings
 ```
-The second car booking will be marked with **cancel:true**
\ No newline at end of file
+The second car booking will be marked with **cancel:true**
+
+## Debugging
+Take the [spring-demo debugging](../saga-spring-demo#debugging) as a reference.