[incubator-servicecomb-saga] branch master updated: SCB-632 reformat code according to google style

2018-05-31 Thread ningjiang
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


The following commit(s) were added to refs/heads/master by this push:
 new e9c53ba  SCB-632 reformat code according to google style
e9c53ba is described below

commit e9c53bafa44280e29e3141ed1e138387f48ee581
Author: Eric Lee 
AuthorDate: Fri Jun 1 12:13:34 2018 +0800

SCB-632 reformat code according to google style
---
 acceptance-tests/acceptance-dubbo-demo/pom.xml | 612 ++---
 .../acceptance/dubbodemo/DubboDemoStepdefs.java|  75 +--
 .../saga/acceptance/dubbodemo/RunCucumberIT.java   |   4 +-
 saga-demo/saga-dubbo-demo/pom.xml  | 195 +++
 saga-demo/saga-dubbo-demo/service-api/pom.xml  |  32 +-
 .../servicecomb/saga/demo/dubbo/api/IService.java  |   1 +
 saga-demo/saga-dubbo-demo/service-pub/pom.xml  |  18 +-
 .../saga/demo/dubbo/pub/AbsService.java|  24 +-
 .../saga/demo/dubbo/pub/IInvokeCode.java   |  32 +-
 .../saga/demo/dubbo/pub/InvokeContext.java |  73 ++-
 .../servicecomb/saga/demo/dubbo/pub/ServiceVO.java |  44 +-
 saga-demo/saga-dubbo-demo/servicea/pom.xml | 124 ++---
 .../saga/demo/dubbo/servicea/ApplicationA.java |   2 +-
 .../saga/demo/dubbo/servicea/ServiceA.java |  73 ++-
 .../servicea/src/main/resources/dubbo-context.xml  |  24 +-
 .../servicea/src/main/resources/jdbc.xml   |  12 +-
 .../servicea/src/main/resources/static/index.html  |  39 +-
 saga-demo/saga-dubbo-demo/serviceb/pom.xml | 116 ++--
 .../saga/demo/dubbo/serviceb/ServiceB.java |  61 +-
 .../serviceb/src/main/resources/dubbo-context.xml  |  22 +-
 .../serviceb/src/main/resources/jdbc.xml   |  12 +-
 saga-demo/saga-dubbo-demo/servicec/pom.xml | 116 ++--
 .../saga/demo/dubbo/servicec/ApplicationC.java |   2 +-
 .../saga/demo/dubbo/servicec/ServiceC.java |  59 +-
 .../servicec/src/main/resources/dubbo-context.xml  |  18 +-
 .../servicec/src/main/resources/jdbc.xml   |  12 +-
 saga-demo/saga-spring-cloud-demo/pom.xml   |   2 +-
 27 files changed, 905 insertions(+), 899 deletions(-)

diff --git a/acceptance-tests/acceptance-dubbo-demo/pom.xml 
b/acceptance-tests/acceptance-dubbo-demo/pom.xml
index 85500d4..47f61d1 100644
--- a/acceptance-tests/acceptance-dubbo-demo/pom.xml
+++ b/acceptance-tests/acceptance-dubbo-demo/pom.xml
@@ -17,314 +17,314 @@
   -->
 
 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;>
-
-acceptance-tests
-org.apache.servicecomb.saga
-0.2.0-SNAPSHOT
-
-4.0.0
-Saga:Acceptance Tests::DubboDemo
-acceptance-dubbo-demo
+  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;>
+  
+acceptance-tests
+org.apache.servicecomb.saga
+0.2.0-SNAPSHOT
+  
+  4.0.0
+  Saga:Acceptance Tests::DubboDemo
+  acceptance-dubbo-demo
 
-
-
-com.fasterxml.jackson.core
-jackson-core
-${jackson.version}
-
-
-com.fasterxml.jackson.core
-jackson-databind
-${jackson.version}
-
-
+  
+
+  com.fasterxml.jackson.core
+  jackson-core
+  ${jackson.version}
+
+
+  com.fasterxml.jackson.core
+  jackson-databind
+  ${jackson.version}
+
+  
 
-
-
-docker
-
-
-
-io.fabric8
-docker-maven-plugin
-
-
-
-docker.io/zookeeper
-zookeeper
-
-
-zk.port:2181
-
-
-
-
-postgres
-postgres
-
-
-saga
-saga
-
password
-
-
-database system is ready to 
accept connections
-
-
-5432

[GitHub] WillemJiang closed pull request #199: SCB-632 reformat code according to google style

2018-05-31 Thread GitBox
WillemJiang closed pull request #199: SCB-632 reformat code according to google 
style
URL: https://github.com/apache/incubator-servicecomb-saga/pull/199
 
 
   

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
index 85500d44..47f61d18 100644
--- a/acceptance-tests/acceptance-dubbo-demo/pom.xml
+++ b/acceptance-tests/acceptance-dubbo-demo/pom.xml
@@ -17,314 +17,314 @@
   -->
 
 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;>
-
-acceptance-tests
-org.apache.servicecomb.saga
-0.2.0-SNAPSHOT
-
-4.0.0
-Saga:Acceptance Tests::DubboDemo
-acceptance-dubbo-demo
+  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;>
+  
+acceptance-tests
+org.apache.servicecomb.saga
+0.2.0-SNAPSHOT
+  
+  4.0.0
+  Saga:Acceptance Tests::DubboDemo
+  acceptance-dubbo-demo
 
-
-
-com.fasterxml.jackson.core
-jackson-core
-${jackson.version}
-
-
-com.fasterxml.jackson.core
-jackson-databind
-${jackson.version}
-
-
+  
+
+  com.fasterxml.jackson.core
+  jackson-core
+  ${jackson.version}
+
+
+  com.fasterxml.jackson.core
+  jackson-databind
+  ${jackson.version}
+
+  
 
-
-
-docker
-
-
-
-io.fabric8
-docker-maven-plugin
-
-
-
-docker.io/zookeeper
-zookeeper
-
-
-zk.port:2181
-
-
-
-
-postgres
-postgres
-
-
-saga
-saga
-
password
-
-
-database system is ready to 
accept connections
-
-
-5432
-
-
-6
-
-
-postgres.port:5432
-
-
-
-
-
alpha-server:${project.version}
-alpha
-
-
-
--Dspring.profiles.active=prd 
-Dspring.datasource.initialization-mode=always
-
-
-
-
postgres:postgresql.servicecomb.io
-
-
-Started [a-zA-Z]+ in [0-9.]+ 
seconds
-
-
-8080
-8090
-
-
-12
-
-
-alpha.port:8080
-alpha.rest.port:8090
-
-

[GitHub] codecov-io commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
codecov-io commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393449869
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=h1)
 Report
   > Merging 
[#363](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b8536343f32337be6075010363c0e432b87d2bd2?src=pr=desc)
 will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/graphs/tree.svg?token=GAaF7zrg8R=650=pr=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
   
   ```diff
   @@   Coverage Diff   @@
   ##   master #363   +/-   ##
   ===
 Coverage   71.46%   71.46%   
   ===
 Files  25   25   
 Lines3690 3690   
   ===
 Hits 2637 2637   
 Misses884  884   
 Partials  169  169
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=footer).
 Last update 
[b853634...e19247f](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
coveralls commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393450688
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17265255/badge)](https://coveralls.io/builds/17265255)
   
   Coverage increased (+0.03%) to 74.676% when pulling 
**e19247fd9ee18513af655e6e9f746e8cd1911b2e on asifdxtreme:master** into 
**b8536343f32337be6075010363c0e432b87d2bd2 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] asifdxtreme commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
asifdxtreme commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393757988
 
 
   @wujimin  When we will make release then we will build it and add the 
dependency in source code, so the release package will contain all the 
dependency and thus User just needs to run binary to make the Service-Center 
running.
   This adds an extra step for making a release but no extra step is required 
by User who is using it.
   Since all the dependencies will be contained in the release package, so we 
have added the licenses of all the dependency in license folder.


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #199: SCB-632 reformat code according to google style

2018-05-31 Thread GitBox
coveralls commented on issue #199: SCB-632 reformat code according to google 
style
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/199#issuecomment-393754450
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17264997/badge)](https://coveralls.io/builds/17264997)
   
   Coverage decreased (-0.2%) to 94.742% when pulling 
**f8431932fa87a0aa76ea98feff0b3b1022aa7958 on eric-lee-ltk:SCB-632** into 
**f7c20b157e56fc085f95e6784fa302586cc56f05 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] eric-lee-ltk opened a new pull request #199: SCB-632 reformat code according to google style

2018-05-31 Thread GitBox
eric-lee-ltk opened a new pull request #199: SCB-632 reformat code according to 
google style
URL: https://github.com/apache/incubator-servicecomb-saga/pull/199
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #198: SCB-584 Fixed the Dubbo*Filter test errors

2018-05-31 Thread GitBox
coveralls commented on issue #198: SCB-584 Fixed the Dubbo*Filter test errors 
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/198#issuecomment-393750254
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17264693/badge)](https://coveralls.io/builds/17264693)
   
   Coverage decreased (-0.3%) to 94.664% when pulling 
**2af3411c7dc44977ad7352a1b716ce6344b6b265 on SCB-584** into 
**f7c20b157e56fc085f95e6784fa302586cc56f05 on master**.
   


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


With regards,
Apache Git Services


[GitHub] WillemJiang opened a new pull request #198: SCB-584 Fixed the Dubbo*Filter test errors

2018-05-31 Thread GitBox
WillemJiang opened a new pull request #198: SCB-584 Fixed the Dubbo*Filter test 
errors 
URL: https://github.com/apache/incubator-servicecomb-saga/pull/198
 
 
Fixed the Dubbo*Filter test errors  by injecting the OmegaContext 
separately.
   


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


With regards,
Apache Git Services


[incubator-servicecomb-saga] 01/01: SCB-584 Fixed the Dubbo*Filter test errors by injecting the OmegaContext seperatly.

2018-05-31 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 2af3411c7dc44977ad7352a1b716ce6344b6b265
Author: Willem Jiang 
AuthorDate: Fri Jun 1 11:33:46 2018 +0800

SCB-584 Fixed the Dubbo*Filter test errors by injecting the OmegaContext 
seperatly.
---
 .../transport/dubbo/SagaDubboConsumerFilter.java   | 12 ---
 .../transport/dubbo/SagaDubboProviderFilter.java   | 13 ++--
 .../src/test/java/SagaDubboConsumerFilterTest.java | 22 ++--
 .../src/test/java/SagaDubboProviderFilterTest.java | 24 +++---
 4 files changed, 33 insertions(+), 38 deletions(-)

diff --git 
a/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboConsumerFilter.java
 
b/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboConsumerFilter.java
index 35f02a2..afb83d1 100644
--- 
a/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboConsumerFilter.java
+++ 
b/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboConsumerFilter.java
@@ -31,6 +31,7 @@ import java.lang.invoke.MethodHandles;
 import org.apache.servicecomb.saga.omega.context.OmegaContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import static 
org.apache.servicecomb.saga.omega.context.OmegaContext.GLOBAL_TX_ID_KEY;
 import static 
org.apache.servicecomb.saga.omega.context.OmegaContext.LOCAL_TX_ID_KEY;
@@ -41,11 +42,16 @@ import static 
org.apache.servicecomb.saga.omega.context.OmegaContext.LOCAL_TX_ID
 @Activate(group = {Constants.CONSUMER})
 public class SagaDubboConsumerFilter implements Filter {
   private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  
+  // As we use the spring to manage the omegaContext, the Autowired work out 
of box
+  @Autowired(required=false)
+  private OmegaContext omegaContext;
+
+  public void setOmegaContext(OmegaContext omegaContext) {
+this.omegaContext = omegaContext;
+  }
 
   public Result invoke(Invoker invoker, Invocation invocation) throws 
RpcException {
-// TODO not sure if it's a good way to look up OmegaContext during every 
invoke
-OmegaContext omegaContext = (OmegaContext) (new SpringExtensionFactory())
-.getExtension(OmegaContext.class, "omegaContext");
 if (omegaContext != null) {
   invocation.getAttachments().put(GLOBAL_TX_ID_KEY, 
omegaContext.globalTxId());
   invocation.getAttachments().put(LOCAL_TX_ID_KEY, 
omegaContext.localTxId());
diff --git 
a/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboProviderFilter.java
 
b/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboProviderFilter.java
index acb0524..618b9b9 100644
--- 
a/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboProviderFilter.java
+++ 
b/omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/saga/omega/transport/dubbo/SagaDubboProviderFilter.java
@@ -24,6 +24,7 @@ import com.alibaba.dubbo.rpc.*;
 import org.apache.servicecomb.saga.omega.context.OmegaContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import java.lang.invoke.MethodHandles;
 
@@ -38,10 +39,16 @@ public class SagaDubboProviderFilter implements Filter {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
+  // As we use the spring to manage the omegaContext, the Autowired work out 
of box
+  @Autowired(required=false)
+  private OmegaContext omegaContext;
+
+  public void setOmegaContext(OmegaContext omegaContext) {
+this.omegaContext = omegaContext;
+  }
+
   @Override
   public Result invoke(Invoker invoker, Invocation invocation) throws 
RpcException {
-// TODO not sure if it's a good way to look up OmegaContext during every 
invoke
-OmegaContext omegaContext = new 
SpringExtensionFactory().getExtension(OmegaContext.class, "omegaContext");
 if (omegaContext != null) {
   String globalTxId = invocation.getAttachment(GLOBAL_TX_ID_KEY);
   if (globalTxId == null) {
@@ -54,6 +61,8 @@ public class SagaDubboProviderFilter implements Filter {
   }
   invocation.getAttachments().put(GLOBAL_TX_ID_KEY, null);
   invocation.getAttachments().put(LOCAL_TX_ID_KEY, null);
+} else {
+  LOG.debug("Cannot find omegaContext");
 }
 
 if (invoker != null) {
diff --git 

[incubator-servicecomb-saga] branch SCB-584 created (now 2af3411)

2018-05-31 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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


  at 2af3411  SCB-584 Fixed the Dubbo*Filter test errors by injecting the 
OmegaContext seperatly.

This branch includes the following new commits:

 new 2af3411  SCB-584 Fixed the Dubbo*Filter test errors by injecting the 
OmegaContext seperatly.

The 1 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.


-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[GitHub] coveralls commented on issue #364: Update swagger

2018-05-31 Thread GitBox
coveralls commented on issue #364: Update swagger
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/364#issuecomment-393746777
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17264527/badge)](https://coveralls.io/builds/17264527)
   
   Coverage remained the same at 74.636% when pulling 
**e2ec4140486e221600b08179908560309a49e7ad on little-cui:master** into 
**4bb475001789921b92ea4348b3455298cf4c84a7 on apache:master**.
   


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


With regards,
Apache Git Services


[incubator-servicecomb-service-center] branch master updated: Update swagger (#364)

2018-05-31 Thread littlecui
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b853634  Update swagger (#364)
b853634 is described below

commit b8536343f32337be6075010363c0e432b87d2bd2
Author: little-cui 
AuthorDate: Fri Jun 1 11:16:06 2018 +0800

Update swagger (#364)
---
 server/core/swagger/v3.yaml | 10 ++
 server/core/swagger/v4.yaml | 87 ++---
 2 files changed, 5 insertions(+), 92 deletions(-)

diff --git a/server/core/swagger/v3.yaml b/server/core/swagger/v3.yaml
index 91d145c..72be23b 100644
--- a/server/core/swagger/v3.yaml
+++ b/server/core/swagger/v3.yaml
@@ -92,7 +92,7 @@ paths:
 200:
   description: 微服务结构体
   schema:
-$ref: '#/definitions/CreateMicroService'
+$ref: '#/definitions/GetMicroServicesResponse'
 400:
   description: 错误的请求
   schema:
@@ -1454,7 +1454,7 @@ definitions:
 items:
$ref: '#/definitions/MicroServiceInstance'
   tags:
-   $ref: '#/definitions/Tags'
+   $ref: "#/definitions/Properties"
 
   GetMicroServicesResponse:
 type: object
@@ -1558,14 +1558,8 @@ definitions:
 description: 服务路由
 items:
   $ref: '#/definitions/ServicePath'
-  providers:
-type: array
-items:
-  $ref: '#/definitions/DependencyKey'
   properties:
 $ref: '#/definitions/Properties'
-  LBStrategy:
-$ref: '#/definitions/Properties'
   HealthCheck:
 type: object
 required:
diff --git a/server/core/swagger/v4.yaml b/server/core/swagger/v4.yaml
index 4717e12..eb92457 100644
--- a/server/core/swagger/v4.yaml
+++ b/server/core/swagger/v4.yaml
@@ -102,18 +102,13 @@ paths:
   description: 微服务唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
   responses:
 200:
   description: 微服务结构体
   schema:
-$ref: '#/definitions/CreateMicroService'
+$ref: '#/definitions/GetMicroServicesResponse'
 400:
   description: 错误的请求
   schema:
@@ -144,7 +139,7 @@ paths:
 - name: force
   in: query
   description: 
不传即默认为false。true表示强制删除,则与该服务相关的信息删除,false表示非强制删除:如果作为该被依赖(作为provider,提供服务,且不是只存在自依赖)或者存在实例,则不能删除,其它均删除。
-  type: string
+  type: boolean
   tags:
 - microservices
   responses:
@@ -174,11 +169,6 @@ paths:
   in: path
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   responses:
 200:
   description: 查询成功
@@ -351,11 +341,6 @@ paths:
   description: 微服务唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
 - tag
@@ -513,11 +498,6 @@ paths:
   description: 微服务唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
 - rule
@@ -644,11 +624,6 @@ paths:
   description: 微服务契约唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
 - schema
@@ -916,11 +891,6 @@ paths:
   description: 消费者的服务id。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
 - name: noSelf
   in: query
   description: 是否取消返回自依赖的关系
@@ -965,11 +935,6 @@ paths:
   description: 提供者的服务id。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
 - name: noSelf
   in: query
   description: 是否取消返回自依赖的关系
@@ -1044,11 +1009,6 @@ paths:
   description: 资源类型为 schema时 需传入schema唯一标识。
   type: string
   required: true
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - schemas
 - microservices
@@ -1141,11 +1101,6 @@ paths:
   in: query
   description: 

[GitHub] little-cui closed pull request #364: Update swagger

2018-05-31 Thread GitBox
little-cui closed pull request #364: Update swagger
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/364
 
 
   

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/server/core/swagger/v3.yaml b/server/core/swagger/v3.yaml
index 91d145c1..72be23b9 100644
--- a/server/core/swagger/v3.yaml
+++ b/server/core/swagger/v3.yaml
@@ -92,7 +92,7 @@ paths:
 200:
   description: 微服务结构体
   schema:
-$ref: '#/definitions/CreateMicroService'
+$ref: '#/definitions/GetMicroServicesResponse'
 400:
   description: 错误的请求
   schema:
@@ -1454,7 +1454,7 @@ definitions:
 items:
$ref: '#/definitions/MicroServiceInstance'
   tags:
-   $ref: '#/definitions/Tags'
+   $ref: "#/definitions/Properties"
 
   GetMicroServicesResponse:
 type: object
@@ -1558,14 +1558,8 @@ definitions:
 description: 服务路由
 items:
   $ref: '#/definitions/ServicePath'
-  providers:
-type: array
-items:
-  $ref: '#/definitions/DependencyKey'
   properties:
 $ref: '#/definitions/Properties'
-  LBStrategy:
-$ref: '#/definitions/Properties'
   HealthCheck:
 type: object
 required:
diff --git a/server/core/swagger/v4.yaml b/server/core/swagger/v4.yaml
index 4717e12c..eb924570 100644
--- a/server/core/swagger/v4.yaml
+++ b/server/core/swagger/v4.yaml
@@ -102,18 +102,13 @@ paths:
   description: 微服务唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
   responses:
 200:
   description: 微服务结构体
   schema:
-$ref: '#/definitions/CreateMicroService'
+$ref: '#/definitions/GetMicroServicesResponse'
 400:
   description: 错误的请求
   schema:
@@ -144,7 +139,7 @@ paths:
 - name: force
   in: query
   description: 
不传即默认为false。true表示强制删除,则与该服务相关的信息删除,false表示非强制删除:如果作为该被依赖(作为provider,提供服务,且不是只存在自依赖)或者存在实例,则不能删除,其它均删除。
-  type: string
+  type: boolean
   tags:
 - microservices
   responses:
@@ -174,11 +169,6 @@ paths:
   in: path
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   responses:
 200:
   description: 查询成功
@@ -351,11 +341,6 @@ paths:
   description: 微服务唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
 - tag
@@ -513,11 +498,6 @@ paths:
   description: 微服务唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
 - rule
@@ -644,11 +624,6 @@ paths:
   description: 微服务契约唯一标识。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - microservices
 - schema
@@ -916,11 +891,6 @@ paths:
   description: 消费者的服务id。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
 - name: noSelf
   in: query
   description: 是否取消返回自依赖的关系
@@ -965,11 +935,6 @@ paths:
   description: 提供者的服务id。
   required: true
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
 - name: noSelf
   in: query
   description: 是否取消返回自依赖的关系
@@ -1044,11 +1009,6 @@ paths:
   description: 资源类型为 schema时 需传入schema唯一标识。
   type: string
   required: true
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - schemas
 - microservices
@@ -1141,11 +1101,6 @@ paths:
   in: query
   description: 实例的environment。
   type: string
-- name: noCache
-  in: query
-  description: 是否强一致性,1 是、0 否。
-  type: integer
-  default: 0
   tags:
 - instances
   responses:
@@ -1235,11 +1190,6 @@ 

[GitHub] little-cui opened a new pull request #364: Update swagger

2018-05-31 Thread GitBox
little-cui opened a new pull request #364: Update swagger
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/364
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `go build` `go test` `go fmt` `go vet` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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


With regards,
Apache Git Services


[incubator-servicecomb-saga] branch master updated: Fixed the Contributing.md typo

2018-05-31 Thread ningjiang
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


The following commit(s) were added to refs/heads/master by this push:
 new f7c20b1  Fixed the Contributing.md typo
f7c20b1 is described below

commit f7c20b157e56fc085f95e6784fa302586cc56f05
Author: Willem Jiang 
AuthorDate: Fri Jun 1 10:07:43 2018 +0800

Fixed the Contributing.md typo
---
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f07675f..4274779 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -40,4 +40,4 @@ Once we've discussed your changes and you've got your code 
ready, make sure that
 
 ## Do you have questions about the source code?
 
-Ask any question about how to use SkyWalking in the 
[Gitter](https://gitter.im/ServiceCombUsers/Lobby).
+Ask any question about how to use ServiceComb in the 
[Gitter](https://gitter.im/ServiceCombUsers/Lobby).

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[GitHub] coveralls commented on issue #743: [SCB-601] when java.lang.Error: not support def type: class io.swagger.models.ComposedMode we don't know which swagger

2018-05-31 Thread GitBox
coveralls commented on issue #743: [SCB-601] when java.lang.Error: not support 
def type: class io.swagger.models.ComposedMode we don't know which swagger
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/743#issuecomment-393460070
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17263900/badge)](https://coveralls.io/builds/17263900)
   
   Coverage decreased (-0.03%) to 87.487% when pulling 
**9b93000ac170bfffe76672274b73b21ddba9f21b on liubao68:edit-02** into 
**fc9c7f40f4d957152a602e68f3be889bf5b8c68f on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor use SPI to support extends

2018-05-31 Thread GitBox
liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor 
use SPI to support extends
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/741#discussion_r192280270
 
 

 ##
 File path: 
common/common-rest/src/main/resources/META-INF/services/org.apache.servicecomb.common.rest.codec.produce.ProduceProcessor
 ##
 @@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.apache.servicecomb.common.rest.codec.produce.ProduceJsonProcessor
 
 Review comment:
   Can you write an end-to-end example to show how to extend 
ProducejsonProcessor? e.g. write  a demo in springmvcclient/server to show a 
new ProducejsonProcessor using XML and JAXB. Maybe your can first write a 
simple example, and XML/JAXB can be supported for formal feature. 


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


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor use SPI to support extends

2018-05-31 Thread GitBox
liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor 
use SPI to support extends
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/741#discussion_r192280270
 
 

 ##
 File path: 
common/common-rest/src/main/resources/META-INF/services/org.apache.servicecomb.common.rest.codec.produce.ProduceProcessor
 ##
 @@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.apache.servicecomb.common.rest.codec.produce.ProduceJsonProcessor
 
 Review comment:
   Can you write an end-to-end example to show how to extend 
ProducejsonProcessor? e.g. write  a demo in springmvcclient/server to show a 
new ProducejsonProcessor using XML and JAXB.


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


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor use SPI to support extends

2018-05-31 Thread GitBox
liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor 
use SPI to support extends
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/741#discussion_r192280141
 
 

 ##
 File path: 
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessorManager.java
 ##
 @@ -17,24 +17,43 @@
 
 package org.apache.servicecomb.common.rest.codec.produce;
 
+import java.util.ServiceLoader;
+
 import javax.ws.rs.core.MediaType;
 
 import org.apache.servicecomb.foundation.common.RegisterManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class ProduceProcessorManager extends RegisterManager {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ProduceProcessorManager.class);
+
+  private static final ServiceLoader produceProcessor = 
ServiceLoader.load(ProduceProcessor.class);
+
   private static final String NAME = "produce processor mgr";
 
   public static final String DEFAULT_TYPE = MediaType.APPLICATION_JSON;
 
   public static final ProduceProcessorManager INSTANCE = new 
ProduceProcessorManager();
 
-  public static final ProduceProcessor JSON_PROCESSOR = new 
ProduceJsonProcessor();
+  public static final ProduceProcessor JSON_PROCESSOR = 
chooseProduceProcessor(MediaType.APPLICATION_JSON);
 
-  public static final ProduceProcessor PLAIN_PROCESSOR = new 
ProduceTextPlainProcessor();
+  public static final ProduceProcessor PLAIN_PROCESSOR = 
chooseProduceProcessor(MediaType.TEXT_PLAIN);
 
   public static final ProduceProcessor DEFAULT_PROCESSOR = JSON_PROCESSOR;
 
   private ProduceProcessorManager() {
 super(NAME);
+produceProcessor.forEach(processor -> register(processor.getName(), 
processor));
+  }
+
+  public static ProduceProcessor chooseProduceProcessor(String type) {
+for (ProduceProcessor processor : produceProcessor) {
+  if (type.equals(processor.getName()))
+return processor;
+}
+LOGGER.warn("Getting the current produceProcessor type {} failed, use 
default produceProcessor: application/json",
+type);
+return new ProduceJsonProcessor();
 
 Review comment:
   This is not fixed as mentioned in previous comment. Do we need to create a 
new instance or can reuse JSON_PROCESSOR ?


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #743: [SCB-601] when java.lang.Error: not support def type: class io.swagger.models.ComposedMode we don't know which swagger

2018-05-31 Thread GitBox
WillemJiang commented on a change in pull request #743: [SCB-601] when 
java.lang.Error: not support def type: class io.swagger.models.ComposedMode we 
don't know which swagger
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/743#discussion_r192278923
 
 

 ##
 File path: 
swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/SwaggerUtils.java
 ##
 @@ -67,6 +71,27 @@ public static Swagger parseSwagger(String swaggerContent) {
 }
   }
 
+  /**
+   * Provide a method to validate swagger. This method is now implemented to 
check common errors, and the logic
+   * will be changed when necessary. For internal use only.
+   */
+  public static void invalidateSwagger(Swagger swagger) {
 
 Review comment:
   the method name should be validateSwagger instead of invalidateSwagger.


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


With regards,
Apache Git Services


[incubator-servicecomb-java-chassis] branch master updated: [SCB-502] add a sample how to use log4j2 as log implement (#735)

2018-05-31 Thread ningjiang
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-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
 new d44a423  [SCB-502] add a sample how to use log4j2 as log implement 
(#735)
d44a423 is described below

commit d44a423dd53be5044c12f153f951fe197b176d8f
Author: zhengyangyong 
AuthorDate: Fri Jun 1 09:18:05 2018 +0800

[SCB-502] add a sample how to use log4j2 as log implement (#735)
---
 java-chassis-dependencies/pom.xml  |   5 +
 .../bmi/calculator/src/main/resources/log4j2.xml   | 227 -
 samples/pom.xml|   1 +
 samples/use-log4j2-sample/pom.xml  |  83 
 .../servicecomb/samples/uselog4j2/Application.java |  26 +++
 .../servicecomb/samples/uselog4j2/Hello.java   |  22 ++
 .../servicecomb/samples/uselog4j2/HelloImpl.java   |  28 +++
 .../src/main/resources/log4j2.xml  |  43 
 .../src/main/resources/microservice.yaml   |  28 +++
 9 files changed, 236 insertions(+), 227 deletions(-)

diff --git a/java-chassis-dependencies/pom.xml 
b/java-chassis-dependencies/pom.xml
index e303cce..c1e3955 100644
--- a/java-chassis-dependencies/pom.xml
+++ b/java-chassis-dependencies/pom.xml
@@ -552,6 +552,11 @@
   
   
 org.apache.logging.log4j
+log4j-slf4j-impl
+${log4j2.version}
+  
+  
+org.apache.logging.log4j
 log4j-api
 ${log4j2.version}
   
diff --git a/samples/bmi/calculator/src/main/resources/log4j2.xml 
b/samples/bmi/calculator/src/main/resources/log4j2.xml
deleted file mode 100644
index a5ba7b3..000
--- a/samples/bmi/calculator/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-
-  
-
-10MB
-
-10
-
-./samples/bmi/calculator/target/metric/
-
-bmi.calculator
-  
-
-  
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-  
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
\ No newline at end of file
diff --git a/samples/pom.xml b/samples/pom.xml
index b724869..4acbd03 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -37,6 +37,7 @@
 metrics-write-file-sample
 metrics-extend-healthcheck
 config-apollo-sample
+use-log4j2-sample
   
 
   
diff --git a/samples/use-log4j2-sample/pom.xml 
b/samples/use-log4j2-sample/pom.xml
new file mode 100644
index 000..7801272
--- /dev/null
+++ b/samples/use-log4j2-sample/pom.xml
@@ -0,0 +1,83 @@
+
+
+
+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;>
+  
+samples
+org.apache.servicecomb.samples
+1.0.0-m2-SNAPSHOT
+  
+  4.0.0
+
+  use-log4j2-sample
+
+  
+UTF-8
+UTF-8
+1.8
+${project.version}
+  
+
+  
+
+  
+org.apache.servicecomb
+java-chassis-dependencies
+${java-chassis.version}
+pom
+import
+  
+
+  
+
+  
+
+  org.apache.servicecomb
+  transport-rest-vertx
+
+
+  org.apache.servicecomb
+  transport-highway
+
+
+  org.apache.servicecomb
+  provider-pojo
+  
+
+  log4j
+  log4j
+
+  
+
+
+
+  org.apache.logging.log4j
+  log4j-slf4j-impl
+
+
+  org.apache.logging.log4j
+  log4j-api
+
+
+  org.apache.logging.log4j
+  log4j-core
+
+  
+
\ No newline at end of file
diff --git 
a/samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.java
 
b/samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.java
new file mode 100644
index 

[GitHub] WillemJiang closed pull request #735: [SCB-502] add a sample how to use log4j2 as log implement

2018-05-31 Thread GitBox
WillemJiang closed pull request #735: [SCB-502] add a sample how to use log4j2 
as log implement
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/735
 
 
   

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/java-chassis-dependencies/pom.xml 
b/java-chassis-dependencies/pom.xml
index e303cce34..c1e3955b0 100644
--- a/java-chassis-dependencies/pom.xml
+++ b/java-chassis-dependencies/pom.xml
@@ -550,6 +550,11 @@
 log4j
 ${log4j.version}
   
+  
+org.apache.logging.log4j
+log4j-slf4j-impl
+${log4j2.version}
+  
   
 org.apache.logging.log4j
 log4j-api
diff --git a/samples/bmi/calculator/src/main/resources/log4j2.xml 
b/samples/bmi/calculator/src/main/resources/log4j2.xml
deleted file mode 100644
index a5ba7b3f0..0
--- a/samples/bmi/calculator/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-
-  
-
-10MB
-
-10
-
-./samples/bmi/calculator/target/metric/
-
-bmi.calculator
-  
-
-  
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-
-  
-  
-  
-
-  
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
\ No newline at end of file
diff --git a/samples/pom.xml b/samples/pom.xml
index b724869b2..4acbd031e 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -37,6 +37,7 @@
 metrics-write-file-sample
 metrics-extend-healthcheck
 config-apollo-sample
+use-log4j2-sample
   
 
   
diff --git a/samples/use-log4j2-sample/pom.xml 
b/samples/use-log4j2-sample/pom.xml
new file mode 100644
index 0..780127205
--- /dev/null
+++ b/samples/use-log4j2-sample/pom.xml
@@ -0,0 +1,83 @@
+
+
+
+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;>
+  
+samples
+org.apache.servicecomb.samples
+1.0.0-m2-SNAPSHOT
+  
+  4.0.0
+
+  use-log4j2-sample
+
+  
+UTF-8
+UTF-8
+1.8
+${project.version}
+  
+
+  
+
+  
+org.apache.servicecomb
+java-chassis-dependencies
+${java-chassis.version}
+pom
+import
+  
+
+  
+
+  
+
+  org.apache.servicecomb
+  transport-rest-vertx
+
+
+  org.apache.servicecomb
+  transport-highway
+
+
+  org.apache.servicecomb
+  provider-pojo
+  
+
+  log4j
+  log4j
+
+  
+
+
+
+  org.apache.logging.log4j
+  log4j-slf4j-impl
+
+
+  org.apache.logging.log4j
+  log4j-api
+
+
+  org.apache.logging.log4j
+  log4j-core
+
+  
+
\ No newline at end of file
diff --git 
a/samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.java
 
b/samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.java
new file mode 100644
index 0..af2e67453
--- /dev/null
+++ 
b/samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.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 

[GitHub] WillemJiang commented on issue #732: SCB-333 Update to support the date time with JSR-310

2018-05-31 Thread GitBox
WillemJiang commented on issue #732: SCB-333 Update to support the date time 
with JSR-310
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/732#issuecomment-393729549
 
 
   @imlidian  Please updated the verification that you did.


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on issue #740: [SCB-595]Compatible with old SC

2018-05-31 Thread GitBox
WillemJiang commented on issue #740: [SCB-595]Compatible with old SC
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/740#issuecomment-393729431
 
 
   There are too many commits, please squash them to a single one.


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #740: [SCB-595]Compatible with old SC

2018-05-31 Thread GitBox
WillemJiang commented on a change in pull request #740: [SCB-595]Compatible 
with old SC
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/740#discussion_r192278473
 
 

 ##
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/AbstractServiceRegistry.java
 ##
 @@ -184,6 +184,16 @@ private void loadFrameworkVersions() {
 framework.setVersion(FrameworkVersions.allVersions());
 microservice.setFramework(framework);
 microservice.setRegisterBy(CONFIG_DEFAULT_REGISTER_BY);
+ServiceCenterInfo info = srClient.getServiceCenterInfo();
+while (info == null) {
+  return;
+}
+String serviceCenterVersion = info.getVersion();
+String validateSuccessVersion = "1.0.0";
+int compareResult = 
serviceCenterVersion.compareTo(validateSuccessVersion);// 如果大于1.0.0,不需要兼容
+if (compareResult < 1) {
+microservice.getFramework().setVersion(null);
 
 Review comment:
   Please add a comment for the meaning of setting the null to the version.


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


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown 
with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192278176
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/producer/ProducerProviderManager.java
 ##
 @@ -17,39 +17,72 @@
 
 package org.apache.servicecomb.core.provider.producer;
 
+import java.io.Closeable;
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.ExecutorService;
 
 import javax.inject.Inject;
 
+import org.apache.commons.io.IOUtils;
+import org.apache.servicecomb.core.BootListener;
 import org.apache.servicecomb.core.ProducerProvider;
 import org.apache.servicecomb.core.definition.MicroserviceMeta;
 import org.apache.servicecomb.core.definition.MicroserviceMetaManager;
+import org.apache.servicecomb.core.definition.OperationMeta;
 import org.apache.servicecomb.core.definition.SchemaMeta;
 import org.apache.servicecomb.core.definition.SchemaUtils;
 import org.apache.servicecomb.serviceregistry.RegistryUtils;
 import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 @Component
-public class ProducerProviderManager {
+public class ProducerProviderManager implements BootListener {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ProducerProviderManager.class);
+
   @Autowired(required = false)
   private List producerProviderList = 
Collections.emptyList();
 
   @Inject
   private MicroserviceMetaManager microserviceMetaManager;
 
+  private MicroserviceMeta microserviceMeta;
+
   public void init() throws Exception {
 for (ProducerProvider provider : producerProviderList) {
   provider.init();
 }
 
 Microservice microservice = RegistryUtils.getMicroservice();
-MicroserviceMeta microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
+microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
 for (SchemaMeta schemaMeta : microserviceMeta.getSchemaMetas()) {
   String content = SchemaUtils.swaggerToString(schemaMeta.getSwagger());
   microservice.addSchema(schemaMeta.getSchemaId(), content);
 }
   }
+
+  @Override
+  public void onBootEvent(BootEvent event) {
+if (!EventType.AFTER_CLOSE.equals(event.getEventType())) {
+  return;
+}
+
+for (OperationMeta operationMeta : microserviceMeta.getOperations()) {
+  if (ExecutorService.class.isInstance(operationMeta.getExecutor())) {
 
 Review comment:
   1.ExecutorService is not closeable
   2.if someone want to do this, it's not our duty to invoke close.


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


With regards,
Apache Git Services


[incubator-servicecomb-java-chassis] branch master updated: [SCB-562] fix NPE when had empty interface (not have any method) (#729)

2018-05-31 Thread ningjiang
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-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
 new 6dc769c  [SCB-562] fix NPE when had empty interface (not have any 
method) (#729)
6dc769c is described below

commit 6dc769cd363568e20c77cea34e8f198acefec153
Author: zhengyangyong 
AuthorDate: Fri Jun 1 09:10:54 2018 +0800

[SCB-562] fix NPE when had empty interface (not have any method) (#729)
---
 .../java/org/apache/servicecomb/core/definition/SchemaMeta.java | 6 ++
 1 file changed, 6 insertions(+)

diff --git 
a/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java 
b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
index 5652904..1a4e6f9 100644
--- a/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
+++ b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
@@ -83,6 +83,12 @@ public class SchemaMeta extends CommonService 
{
   }
 
   private void initOperations() {
+if (swagger.getPaths() == null) {
+  LOGGER.warn(swagger.getInfo().getTitle() + " with path " + 
swagger.getBasePath()
+  + " is an empty interface, please delete it or fill with one 
method!");
+  return;
+}
+
 for (Entry entry : swagger.getPaths().entrySet()) {
   String strPath = entry.getKey();
   Path path = entry.getValue();

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.


[GitHub] wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown 
with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192278176
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/producer/ProducerProviderManager.java
 ##
 @@ -17,39 +17,72 @@
 
 package org.apache.servicecomb.core.provider.producer;
 
+import java.io.Closeable;
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.ExecutorService;
 
 import javax.inject.Inject;
 
+import org.apache.commons.io.IOUtils;
+import org.apache.servicecomb.core.BootListener;
 import org.apache.servicecomb.core.ProducerProvider;
 import org.apache.servicecomb.core.definition.MicroserviceMeta;
 import org.apache.servicecomb.core.definition.MicroserviceMetaManager;
+import org.apache.servicecomb.core.definition.OperationMeta;
 import org.apache.servicecomb.core.definition.SchemaMeta;
 import org.apache.servicecomb.core.definition.SchemaUtils;
 import org.apache.servicecomb.serviceregistry.RegistryUtils;
 import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 @Component
-public class ProducerProviderManager {
+public class ProducerProviderManager implements BootListener {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ProducerProviderManager.class);
+
   @Autowired(required = false)
   private List producerProviderList = 
Collections.emptyList();
 
   @Inject
   private MicroserviceMetaManager microserviceMetaManager;
 
+  private MicroserviceMeta microserviceMeta;
+
   public void init() throws Exception {
 for (ProducerProvider provider : producerProviderList) {
   provider.init();
 }
 
 Microservice microservice = RegistryUtils.getMicroservice();
-MicroserviceMeta microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
+microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
 for (SchemaMeta schemaMeta : microserviceMeta.getSchemaMetas()) {
   String content = SchemaUtils.swaggerToString(schemaMeta.getSwagger());
   microservice.addSchema(schemaMeta.getSchemaId(), content);
 }
   }
+
+  @Override
+  public void onBootEvent(BootEvent event) {
+if (!EventType.AFTER_CLOSE.equals(event.getEventType())) {
+  return;
+}
+
+for (OperationMeta operationMeta : microserviceMeta.getOperations()) {
+  if (ExecutorService.class.isInstance(operationMeta.getExecutor())) {
 
 Review comment:
   1.ExecutorService is not closeable
   2.ExecutorService support shutdown multi times


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


With regards,
Apache Git Services


[GitHub] WillemJiang closed pull request #729: [SCB-562] fix NPE when had empty interface (not have any method)

2018-05-31 Thread GitBox
WillemJiang closed pull request #729: [SCB-562] fix NPE when had empty 
interface (not have any method)
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/729
 
 
   

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/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java 
b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
index 565290479..1a4e6f91d 100644
--- a/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
+++ b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
@@ -83,6 +83,12 @@ public String getPackageName() {
   }
 
   private void initOperations() {
+if (swagger.getPaths() == null) {
+  LOGGER.warn(swagger.getInfo().getTitle() + " with path " + 
swagger.getBasePath()
+  + " is an empty interface, please delete it or fill with one 
method!");
+  return;
+}
+
 for (Entry entry : swagger.getPaths().entrySet()) {
   String strPath = entry.getKey();
   Path path = entry.getValue();


 


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


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown 
with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192278085
 
 

 ##
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##
 @@ -109,13 +109,15 @@
 
   private ConfigCenterConfigurationSourceImpl.UpdateHandler updateHandler;
 
-  private static ClientPoolManager clientMgr;
+  private ClientPoolManager clientMgr;
 
   private boolean isWatching = false;
 
-  private static final ServiceLoader authHeaderProviders =
+  private final ServiceLoader authHeaderProviders =
   ServiceLoader.load(AuthHeaderProvider.class);
 
+  private URIConst uriConst = new URIConst();
 
 Review comment:
   not necessary
   only use once here


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
WillemJiang commented on a change in pull request #731: [SCB-617] Graceful 
shutdown with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192277913
 
 

 ##
 File path: 
dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java
 ##
 @@ -109,13 +109,15 @@
 
   private ConfigCenterConfigurationSourceImpl.UpdateHandler updateHandler;
 
-  private static ClientPoolManager clientMgr;
+  private ClientPoolManager clientMgr;
 
   private boolean isWatching = false;
 
-  private static final ServiceLoader authHeaderProviders =
+  private final ServiceLoader authHeaderProviders =
   ServiceLoader.load(AuthHeaderProvider.class);
 
+  private URIConst uriConst = new URIConst();
 
 Review comment:
   Do we need to create a instance of Constant object here?


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
WillemJiang commented on a change in pull request #731: [SCB-617] Graceful 
shutdown with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192277636
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/producer/ProducerProviderManager.java
 ##
 @@ -17,39 +17,72 @@
 
 package org.apache.servicecomb.core.provider.producer;
 
+import java.io.Closeable;
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.ExecutorService;
 
 import javax.inject.Inject;
 
+import org.apache.commons.io.IOUtils;
+import org.apache.servicecomb.core.BootListener;
 import org.apache.servicecomb.core.ProducerProvider;
 import org.apache.servicecomb.core.definition.MicroserviceMeta;
 import org.apache.servicecomb.core.definition.MicroserviceMetaManager;
+import org.apache.servicecomb.core.definition.OperationMeta;
 import org.apache.servicecomb.core.definition.SchemaMeta;
 import org.apache.servicecomb.core.definition.SchemaUtils;
 import org.apache.servicecomb.serviceregistry.RegistryUtils;
 import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 @Component
-public class ProducerProviderManager {
+public class ProducerProviderManager implements BootListener {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ProducerProviderManager.class);
+
   @Autowired(required = false)
   private List producerProviderList = 
Collections.emptyList();
 
   @Inject
   private MicroserviceMetaManager microserviceMetaManager;
 
+  private MicroserviceMeta microserviceMeta;
+
   public void init() throws Exception {
 for (ProducerProvider provider : producerProviderList) {
   provider.init();
 }
 
 Microservice microservice = RegistryUtils.getMicroservice();
-MicroserviceMeta microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
+microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
 for (SchemaMeta schemaMeta : microserviceMeta.getSchemaMetas()) {
   String content = SchemaUtils.swaggerToString(schemaMeta.getSwagger());
   microservice.addSchema(schemaMeta.getSchemaId(), content);
 }
   }
+
+  @Override
+  public void onBootEvent(BootEvent event) {
+if (!EventType.AFTER_CLOSE.equals(event.getEventType())) {
+  return;
+}
+
+for (OperationMeta operationMeta : microserviceMeta.getOperations()) {
+  if (ExecutorService.class.isInstance(operationMeta.getExecutor())) {
 
 Review comment:
   What if the excecutor is the instand of ExecutorService and Closeable at the 
same time?


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


With regards,
Apache Git Services


[incubator-servicecomb-saga] branch master updated: SCB-628 correct naming for demos

2018-05-31 Thread ningjiang
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


The following commit(s) were added to refs/heads/master by this push:
 new a7382ea  SCB-628 correct naming for demos
a7382ea is described below

commit a7382ea68b2206bb50cacdad22d369f464e4005a
Author: Eric Lee 
AuthorDate: Thu May 31 23:08:20 2018 +0800

SCB-628 correct naming for demos

Signed-off-by: Eric Lee 
---
 README.md  | 3 ++-
 README_ZH.md   | 3 ++-
 .../{acceptance-pack => acceptance-spring-cloud-demo}/pom.xml  | 0
 .../src/test/java/org/apache/servicecomb/saga/PackStepdefs.java| 0
 .../src/test/java/org/apache/servicecomb/saga/RunCucumberIT.java   | 0
 .../src/test/resources/booking_timeout.btm | 0
 .../src/test/resources/log4j2-test.xml | 0
 .../src/test/resources/pack_compensation_scenario.feature  | 0
 .../src/test/resources/pack_success_scenario.feature   | 0
 .../src/test/resources/pack_timeout_scenario.feature   | 0
 acceptance-tests/pom.xml   | 2 +-
 saga-demo/pom.xml  | 2 +-
 saga-demo/{booking => saga-spring-cloud-demo}/README.md| 0
 saga-demo/{booking => saga-spring-cloud-demo}/booking/pom.xml  | 0
 .../org/apache/servicecomb/saga/demo/pack/booking/Application.java | 0
 .../apache/servicecomb/saga/demo/pack/booking/BookingController.java   | 0
 .../org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java | 0
 .../booking/src/main/resources/application.yaml| 0
 .../booking}/src/main/resources/log4j2.xml | 0
 .../booking/src/main/resources/static/index.html   | 0
 saga-demo/{booking => saga-spring-cloud-demo}/car/pom.xml  | 0
 .../java/org/apache/servicecomb/saga/demo/pack/car/Application.java| 0
 .../java/org/apache/servicecomb/saga/demo/pack/car/CarBooking.java | 0
 .../apache/servicecomb/saga/demo/pack/car/CarBookingController.java| 0
 .../org/apache/servicecomb/saga/demo/pack/car/CarBookingService.java   | 0
 .../car/src/main/resources/application.yaml| 0
 .../car/src/main/resources/log4j2.xml  | 0
 .../{booking => saga-spring-cloud-demo}/docker-compose-alpha.yaml  | 0
 saga-demo/{booking => saga-spring-cloud-demo}/docker-compose-demo.yaml | 0
 .../{booking => saga-spring-cloud-demo}/docker-compose.mysql.yaml  | 0
 saga-demo/{booking => saga-spring-cloud-demo}/docker-compose.yaml  | 0
 saga-demo/{booking => saga-spring-cloud-demo}/hotel/pom.xml| 0
 .../java/org/apache/servicecomb/saga/demo/pack/hotel/Application.java  | 0
 .../java/org/apache/servicecomb/saga/demo/pack/hotel/HotelBooking.java | 0
 .../servicecomb/saga/demo/pack/hotel/HotelBookingController.java   | 0
 .../apache/servicecomb/saga/demo/pack/hotel/HotelBookingService.java   | 0
 .../hotel/src/main/resources/application.yaml  | 0
 .../hotel}/src/main/resources/log4j2.xml   | 0
 saga-demo/{booking => saga-spring-cloud-demo}/pom.xml  | 0
 saga-demo/{booking => saga-spring-cloud-demo}/saga-demo.sh | 0
 40 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 65cffa2..cc0ca13 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,8 @@ The following diagram shows the relationships among alpha, 
omega and services.
 See [Saga Pack Design](docs/design.md) for details. 
 
 ## Get Started
-See [Booking Demo](saga-demo/booking/README.md) for details.
+* For Spring Cloud applications, please see [Booking 
Demo](saga-demo/saga-spring-cloud-demo/README.md) for details.
+* For Dubbo applications, please see [Dubbo 
Demo](saga-demo/saga-dubbo-demo/README.md) for details.
 
 ## Build and Run the tests from source
 * Build the source demo docker image and run all tests
diff --git a/README_ZH.md b/README_ZH.md
index 8367c0c..6319277 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -20,7 +20,8 @@ Saga是由 **alpha** 和 **omega**组成,其中:
 详情可浏览[Saga Pack 设计文档](docs/design_zh.md). 
 
 ## 快速入门
-详情可浏览[出行预订示例](saga-demo/booking/README.md)。
+* Saga在Spring 
Cloud应用的用法可参考[出行预订示例](saga-demo/saga-spring-cloud-demo/README.md)。
+* Saga在Dubbo应用的用法可参考[Dubbo示例](saga-demo/saga-dubbo-demo/README.md).
 
 ## 用户指南
 如何构建和使用可浏览[用户指南](docs/user_guide_zh.md)。
diff --git a/acceptance-tests/acceptance-pack/pom.xml 
b/acceptance-tests/acceptance-spring-cloud-demo/pom.xml
similarity index 100%
rename from acceptance-tests/acceptance-pack/pom.xml
rename to acceptance-tests/acceptance-spring-cloud-demo/pom.xml

[GitHub] WillemJiang closed pull request #197: SCB-628 correct naming for demos

2018-05-31 Thread GitBox
WillemJiang closed pull request #197: SCB-628 correct naming for demos
URL: https://github.com/apache/incubator-servicecomb-saga/pull/197
 
 
   

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/README.md b/README.md
index 65cffa27..cc0ca130 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,8 @@ The following diagram shows the relationships among alpha, 
omega and services.
 See [Saga Pack Design](docs/design.md) for details. 
 
 ## Get Started
-See [Booking Demo](saga-demo/booking/README.md) for details.
+* For Spring Cloud applications, please see [Booking 
Demo](saga-demo/saga-spring-cloud-demo/README.md) for details.
+* For Dubbo applications, please see [Dubbo 
Demo](saga-demo/saga-dubbo-demo/README.md) for details.
 
 ## Build and Run the tests from source
 * Build the source demo docker image and run all tests
diff --git a/README_ZH.md b/README_ZH.md
index 8367c0cf..6319277d 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -20,7 +20,8 @@ Saga是由 **alpha** 和 **omega**组成,其中:
 详情可浏览[Saga Pack 设计文档](docs/design_zh.md). 
 
 ## 快速入门
-详情可浏览[出行预订示例](saga-demo/booking/README.md)。
+* Saga在Spring 
Cloud应用的用法可参考[出行预订示例](saga-demo/saga-spring-cloud-demo/README.md)。
+* Saga在Dubbo应用的用法可参考[Dubbo示例](saga-demo/saga-dubbo-demo/README.md).
 
 ## 用户指南
 如何构建和使用可浏览[用户指南](docs/user_guide_zh.md)。
diff --git a/acceptance-tests/acceptance-pack/pom.xml 
b/acceptance-tests/acceptance-spring-cloud-demo/pom.xml
similarity index 100%
rename from acceptance-tests/acceptance-pack/pom.xml
rename to acceptance-tests/acceptance-spring-cloud-demo/pom.xml
diff --git 
a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
 
b/acceptance-tests/acceptance-spring-cloud-demo/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
similarity index 100%
rename from 
acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
rename to 
acceptance-tests/acceptance-spring-cloud-demo/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
diff --git 
a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/RunCucumberIT.java
 
b/acceptance-tests/acceptance-spring-cloud-demo/src/test/java/org/apache/servicecomb/saga/RunCucumberIT.java
similarity index 100%
rename from 
acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/RunCucumberIT.java
rename to 
acceptance-tests/acceptance-spring-cloud-demo/src/test/java/org/apache/servicecomb/saga/RunCucumberIT.java
diff --git 
a/acceptance-tests/acceptance-pack/src/test/resources/booking_timeout.btm 
b/acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/booking_timeout.btm
similarity index 100%
rename from 
acceptance-tests/acceptance-pack/src/test/resources/booking_timeout.btm
rename to 
acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/booking_timeout.btm
diff --git 
a/acceptance-tests/acceptance-pack/src/test/resources/log4j2-test.xml 
b/acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/log4j2-test.xml
similarity index 100%
rename from acceptance-tests/acceptance-pack/src/test/resources/log4j2-test.xml
rename to 
acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/log4j2-test.xml
diff --git 
a/acceptance-tests/acceptance-pack/src/test/resources/pack_compensation_scenario.feature
 
b/acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/pack_compensation_scenario.feature
similarity index 100%
rename from 
acceptance-tests/acceptance-pack/src/test/resources/pack_compensation_scenario.feature
rename to 
acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/pack_compensation_scenario.feature
diff --git 
a/acceptance-tests/acceptance-pack/src/test/resources/pack_success_scenario.feature
 
b/acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/pack_success_scenario.feature
similarity index 100%
rename from 
acceptance-tests/acceptance-pack/src/test/resources/pack_success_scenario.feature
rename to 
acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/pack_success_scenario.feature
diff --git 
a/acceptance-tests/acceptance-pack/src/test/resources/pack_timeout_scenario.feature
 
b/acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/pack_timeout_scenario.feature
similarity index 100%
rename from 
acceptance-tests/acceptance-pack/src/test/resources/pack_timeout_scenario.feature
rename to 
acceptance-tests/acceptance-spring-cloud-demo/src/test/resources/pack_timeout_scenario.feature
diff --git a/acceptance-tests/pom.xml b/acceptance-tests/pom.xml
index 572d949b..8572a0f7 100644
--- a/acceptance-tests/pom.xml
+++ b/acceptance-tests/pom.xml
@@ -30,8 +30,8 @@
   Saga:Acceptance Tests
   pom
   
-acceptance-pack
 acceptance-dubbo-demo
+

[GitHub] coveralls commented on issue #197: SCB-628 correct naming for demos

2018-05-31 Thread GitBox
coveralls commented on issue #197: SCB-628 correct naming for demos
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/197#issuecomment-393715334
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17262279/badge)](https://coveralls.io/builds/17262279)
   
   Coverage increased (+0.09%) to 94.742% when pulling 
**8dbe0ee4101b774de44561eb0f00edb7536b0aa8 on eric-lee-ltk:SCB-628** into 
**2bf0901dc629be116d63725ba20843a571543b03 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
coveralls commented on issue #731: [SCB-617] Graceful shutdown with standalone 
tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#issuecomment-392573045
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17258596/badge)](https://coveralls.io/builds/17258596)
   
   Coverage increased (+0.03%) to 87.55% when pulling 
**dd4e69f3df9757ba51c33faefcbcf0c0a1f1e19e on 
wujimin:graceful-shutdown-with-standalone-tomcat** into 
**fc9c7f40f4d957152a602e68f3be889bf5b8c68f on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown 
with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192198082
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/provider/producer/ProducerProviderManager.java
 ##
 @@ -17,39 +17,71 @@
 
 package org.apache.servicecomb.core.provider.producer;
 
+import java.io.Closeable;
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.ExecutorService;
 
 import javax.inject.Inject;
 
+import org.apache.commons.io.IOUtils;
+import org.apache.servicecomb.core.BootListener;
 import org.apache.servicecomb.core.ProducerProvider;
 import org.apache.servicecomb.core.definition.MicroserviceMeta;
 import org.apache.servicecomb.core.definition.MicroserviceMetaManager;
+import org.apache.servicecomb.core.definition.OperationMeta;
 import org.apache.servicecomb.core.definition.SchemaMeta;
 import org.apache.servicecomb.core.definition.SchemaUtils;
 import org.apache.servicecomb.serviceregistry.RegistryUtils;
 import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 @Component
-public class ProducerProviderManager {
+public class ProducerProviderManager implements BootListener {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ProducerProviderManager.class);
+
   @Autowired(required = false)
   private List producerProviderList = 
Collections.emptyList();
 
   @Inject
   private MicroserviceMetaManager microserviceMetaManager;
 
+  private MicroserviceMeta microserviceMeta;
+
   public void init() throws Exception {
 for (ProducerProvider provider : producerProviderList) {
   provider.init();
 }
 
 Microservice microservice = RegistryUtils.getMicroservice();
-MicroserviceMeta microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
+microserviceMeta = 
microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
 for (SchemaMeta schemaMeta : microserviceMeta.getSchemaMetas()) {
   String content = SchemaUtils.swaggerToString(schemaMeta.getSwagger());
   microservice.addSchema(schemaMeta.getSchemaId(), content);
 }
   }
+
+  @Override
+  public void onBootEvent(BootEvent event) {
+if (!EventType.AFTER_CLOSE.equals(event.getEventType())) {
+  return;
+}
+
+for (OperationMeta operationMeta : microserviceMeta.getOperations()) {
+  if (ExecutorService.class.isInstance(operationMeta.getExecutor())) {
+((ExecutorService) operationMeta.getExecutor()).shutdown();
+continue;
+  }
+
+  if (Closeable.class.isInstance(operationMeta.getExecutor())) {
+IOUtils.closeQuietly((Closeable) operationMeta.getExecutor());
+continue;
+  }
+
+  LOGGER.warn("do not how to shutdown executor: {}", 
operationMeta.getExecutor().getClass().getName());
 
 Review comment:
   done


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


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown 
with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192198103
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/executor/FixedThreadExecutor.java
 ##
 @@ -74,4 +76,11 @@ private Executor chooseExecutor(long threadId) {
 int idx = index.getAndIncrement() % executorList.size();
 return executorList.get(idx);
   }
+
+  @Override
+  public void close() {
+for (ExecutorService executorService : executorList) {
+  executorService.shutdown();
+}
+  }
 
 Review comment:
   done


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


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown with standalone tomcat

2018-05-31 Thread GitBox
wujimin commented on a change in pull request #731: [SCB-617] Graceful shutdown 
with standalone tomcat
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/731#discussion_r192198050
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java
 ##
 @@ -71,6 +72,8 @@ public void onApplicationEvent(ApplicationEvent event) {
   }
 
   SCBEngine.getInstance().init();
+} else if (event instanceof ContextClosedEvent) {
+  SCBEngine.getInstance().uninit();
 
 Review comment:
   done
   changed all uninit to destroy


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
codecov-io commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393449869
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=h1)
 Report
   > Merging 
[#363](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b87ea66f7834d893aab7aa864df272e1c5ad9106?src=pr=desc)
 will **increase** coverage by `2.12%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/graphs/tree.svg?width=650=pr=GAaF7zrg8R=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #363  +/-   ##
   ==
   + Coverage   69.33%   71.46%   +2.12% 
   ==
 Files  18   25   +7 
 Lines3437 3690 +253 
   ==
   + Hits 2383 2637 +254 
   + Misses885  884   -1 
 Partials  169  169
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/rule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZS5nbw==)
 | `74.52% <0%> (-2.3%)` | :arrow_down: |
   | 
[server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv)
 | `56.17% <0%> (-0.61%)` | :arrow_down: |
   | 
[server/service/util/versionrule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC92ZXJzaW9ucnVsZS5nbw==)
 | `100% <0%> (ø)` | :arrow_up: |
   | 
[server/service/resource\_assembler.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcmVzb3VyY2VfYXNzZW1ibGVyLmdv)
 | | |
   | 
[server/service/service\_dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2VydmljZV9kZXBlbmRlbmN5Lmdv)
 | | |
   | 
[server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv)
 | | |
   | 
[server/service/microservices.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvbWljcm9zZXJ2aWNlcy5nbw==)
 | | |
   | 
[server/service/validate.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdmFsaWRhdGUuZ28=)
 | `82% <0%> (ø)` | |
   | 
[server/service/instance.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2UuZ28=)
 | `68.37% <0%> (ø)` | |
   | 
[server/service/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvZGVwZW5kZW5jeS5nbw==)
 | `73.59% <0%> (ø)` | |
   | ... and [10 
more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=footer).
 Last update 
[b87ea66...8fa0588](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] asifdxtreme commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
asifdxtreme commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393536592
 
 
   @little-cui npm is for node_modules, here our backend file server is in go 
so npm is not required, in frontend we use bower components as most of the 
dependencies are available as bower packages so `bower install` resolves our 
problem


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
coveralls commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393450688
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17252229/badge)](https://coveralls.io/builds/17252229)
   
   Coverage decreased (-0.007%) to 72.902% when pulling 
**abd455ad87a646914665c1e375215da9f4b59d76 on asifdxtreme:master** into 
**b87ea66f7834d893aab7aa864df272e1c5ad9106 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
codecov-io commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393449869
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=h1)
 Report
   > Merging 
[#363](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b87ea66f7834d893aab7aa864df272e1c5ad9106?src=pr=desc)
 will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/graphs/tree.svg?width=650=150=pr=GAaF7zrg8R)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
   
   ```diff
   @@   Coverage Diff   @@
   ##   master #363   +/-   ##
   ===
 Coverage   69.33%   69.33%   
   ===
 Files  18   18   
 Lines3437 3437   
   ===
 Hits 2383 2383   
 Misses885  885   
 Partials  169  169
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=footer).
 Last update 
[b87ea66...abd455a](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #355: SCB-600 Support the max major/minor/patch version is MaxInt16

2018-05-31 Thread GitBox
coveralls commented on issue #355: SCB-600 Support the max major/minor/patch 
version is MaxInt16
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/355#issuecomment-391280405
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17252171/badge)](https://coveralls.io/builds/17252171)
   
   Coverage increased (+1.7%) to 74.631% when pulling 
**4c503c3690e94592199a3f54ced39b5cb0515f65 on little-cui:master** into 
**b87ea66f7834d893aab7aa864df272e1c5ad9106 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #355: SCB-600 Support the max major/minor/patch version is MaxInt16

2018-05-31 Thread GitBox
codecov-io commented on issue #355: SCB-600 Support the max major/minor/patch 
version is MaxInt16
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/355#issuecomment-391280202
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355?src=pr=h1)
 Report
   > Merging 
[#355](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b87ea66f7834d893aab7aa864df272e1c5ad9106?src=pr=desc)
 will **increase** coverage by `2.12%`.
   > The diff coverage is `94.96%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/graphs/tree.svg?src=pr=GAaF7zrg8R=650=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #355  +/-   ##
   ==
   + Coverage   69.33%   71.46%   +2.12% 
   ==
 Files  18   25   +7 
 Lines3437 3690 +253 
   ==
   + Hits 2383 2637 +254 
   + Misses885  884   -1 
 Partials  169  169
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/service.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2VydmljZS5nbw==)
 | `100% <ø> (ø)` | |
   | 
[server/service/rule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZS5nbw==)
 | `74.52% <100%> (-2.3%)` | :arrow_down: |
   | 
[server/service/dependency\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvZGVwZW5kZW5jeV92YWxpZGF0b3IuZ28=)
 | `100% <100%> (ø)` | |
   | 
[server/service/instance.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2UuZ28=)
 | `68.37% <100%> (ø)` | |
   | 
[server/service/util/versionrule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC92ZXJzaW9ucnVsZS5nbw==)
 | `100% <100%> (ø)` | :arrow_up: |
   | 
[server/service/rule\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZV92YWxpZGF0b3IuZ28=)
 | `100% <100%> (ø)` | |
   | 
[server/service/instance\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VfdmFsaWRhdG9yLmdv)
 | `100% <100%> (ø)` | |
   | 
[server/service/schema\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2NoZW1hX3ZhbGlkYXRvci5nbw==)
 | `100% <100%> (ø)` | |
   | 
[server/service/tag\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnX3ZhbGlkYXRvci5nbw==)
 | `100% <100%> (ø)` | |
   | 
[server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv)
 | `75.43% <100%> (ø)` | :arrow_up: |
   | ... and [16 
more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355?src=pr=footer).
 Last update 
[b87ea66...4c503c3](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/355?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] asifdxtreme commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
asifdxtreme commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393536592
 
 
   @little-cui npm is for node_modules, here our backend file server is in go 
so npm is not required, in frontend we use bower components for dependency so 
`bower install` resolves our problem


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #741: [SCB-625] ProduceProcessor use SPI to support extends

2018-05-31 Thread GitBox
coveralls commented on issue #741: [SCB-625] ProduceProcessor use SPI to 
support extends
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/741#issuecomment-393089504
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17251006/badge)](https://coveralls.io/builds/17251006)
   
   Coverage decreased (-0.01%) to 87.509% when pulling 
**c812b85caf3e998ecbabaca4b2830ad10f410009 on weichao666:produceprocessor** 
into **69f8b17bb82c777ea0b685405fa4e3c44ae9b066 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] little-cui commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
little-cui commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393519776
 
 
   Is there any advantage compare with npm?


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
coveralls commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393450688
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17250585/badge)](https://coveralls.io/builds/17250585)
   
   Coverage increased (+0.1%) to 73.01% when pulling 
**00866e8c4e12bdf493f0bb7ba951659b2dea8b45 on asifdxtreme:master** into 
**b87ea66f7834d893aab7aa864df272e1c5ad9106 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
codecov-io commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393449869
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=h1)
 Report
   > Merging 
[#363](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b87ea66f7834d893aab7aa864df272e1c5ad9106?src=pr=desc)
 will **increase** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/graphs/tree.svg?width=650=150=pr=GAaF7zrg8R)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #363  +/-   ##
   ==
   + Coverage   69.33%   69.36%   +0.02% 
   ==
 Files  18   18  
 Lines3437 3437  
   ==
   + Hits 2383 2384   +1 
 Misses885  885  
   + Partials  169  168   -1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv)
 | `76.02% <0%> (+0.58%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=footer).
 Last update 
[b87ea66...00866e8](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] weichao666 commented on a change in pull request #741: [SCB-625] ProduceProcessor use SPI to support extends

2018-05-31 Thread GitBox
weichao666 commented on a change in pull request #741: [SCB-625] 
ProduceProcessor use SPI to support extends
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/741#discussion_r192085651
 
 

 ##
 File path: 
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessorManager.java
 ##
 @@ -17,24 +17,43 @@
 
 package org.apache.servicecomb.common.rest.codec.produce;
 
+import java.util.ServiceLoader;
+
 import javax.ws.rs.core.MediaType;
 
 import org.apache.servicecomb.foundation.common.RegisterManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class ProduceProcessorManager extends RegisterManager {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ProduceProcessorManager.class);
+
+  private static final ServiceLoader produceProcessor = 
ServiceLoader.load(ProduceProcessor.class);
+
   private static final String NAME = "produce processor mgr";
 
   public static final String DEFAULT_TYPE = MediaType.APPLICATION_JSON;
 
   public static final ProduceProcessorManager INSTANCE = new 
ProduceProcessorManager();
 
-  public static final ProduceProcessor JSON_PROCESSOR = new 
ProduceJsonProcessor();
+  public static final ProduceProcessor JSON_PROCESSOR = 
chooseProduceProcessor(MediaType.APPLICATION_JSON);
 
-  public static final ProduceProcessor PLAIN_PROCESSOR = new 
ProduceTextPlainProcessor();
+  public static final ProduceProcessor PLAIN_PROCESSOR = 
chooseProduceProcessor(MediaType.TEXT_PLAIN);
 
   public static final ProduceProcessor DEFAULT_PROCESSOR = JSON_PROCESSOR;
 
   private ProduceProcessorManager() {
 super(NAME);
+produceProcessor.forEach(processor -> register(processor.getName(), 
processor));
+  }
+
+  public static ProduceProcessor chooseProduceProcessor(String type) {
+for (ProduceProcessor processor : produceProcessor) {
+  if (type.equals(processor.getName()))
+return processor;
+}
+LOGGER.error("Getting the current produceProcessor type {} failed, use 
default produceProcessor: application/json",
+type);
+return new ProduceJsonProcessor();
 
 Review comment:
   done


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


With regards,
Apache Git Services


[GitHub] asifdxtreme commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
asifdxtreme commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393516830
 
 
   @WillemJiang I have updated the PR, Now we can use `bower install` to 
install all the dependencies in development time.
   Still in a release package we have to ship all the dependencies.
   


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


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #744: [SCB-627] Client Request Timeout support for operation/schema/service level

2018-05-31 Thread GitBox
liubao68 commented on a change in pull request #744: [SCB-627] Client Request 
Timeout support for operation/schema/service level
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/744#discussion_r192084714
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/transport/AbstractTransport.java
 ##
 @@ -160,4 +161,83 @@ public Object parseAddress(String address) {
 }
 return new URIEndpointObject(address);
   }
+
+  /**
+   * Handles the request timeout configurations.
+   * 
+   * @param invocation
+   *invocation of request
+   * @return configuration value
+   */
+  public static long getReqTimeout(Invocation invocation) {
+long value = 0;
+String config;
+
+// get the config base on priority. 
operationName-->schema-->service-->global
+String operationName = invocation.getOperationName();
+String schema = invocation.getSchemaId();
+String serviceName = invocation.getMicroserviceName();
+
+config = CONSUMER_REQUEST_TIMEOUT + "." + serviceName + "." + schema + "." 
+ operationName;
+value = getConfigValue(config);
+if ((value != REQUEST_TIMEOUT_CFG_FAIL)) {
+  return value;
+}
+
+config = CONSUMER_REQUEST_TIMEOUT + "." + serviceName + "." + schema;
+value = getConfigValue(config);
+if ((value != REQUEST_TIMEOUT_CFG_FAIL)) {
+  return value;
+}
+
+config = CONSUMER_REQUEST_TIMEOUT + "." + serviceName;
+value = getConfigValue(config);
+if ((value != REQUEST_TIMEOUT_CFG_FAIL)) {
+  return value;
+}
+
+value = getConfigValue(CONSUMER_REQUEST_TIMEOUT);
+if ((value != REQUEST_TIMEOUT_CFG_FAIL)) {
+  return value;
+}
+return DEFAULT_TIMEOUT_MILLIS;
+  }
+
+  /**
+   * Get the configuration value
+   * @param config config parameter
+   * @return long value
+   */
+  private static long getConfigParam(String config, long defaultValue) {
 
 Review comment:
   Maybe you can refer to 
https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java
 to make this method simpler. 
   
   And you do not need to cache configure center values, since 
DynamicPropertyFactory.getInstance().getLongProperty will get the latest value 
for you. 


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #743: [SCB-601] when java.lang.Error: not support def type: class io.swagger.models.ComposedMode we don't know which swagger

2018-05-31 Thread GitBox
coveralls commented on issue #743: [SCB-601] when java.lang.Error: not support 
def type: class io.swagger.models.ComposedMode we don't know which swagger
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/743#issuecomment-393460070
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17250398/badge)](https://coveralls.io/builds/17250398)
   
   Coverage decreased (-0.009%) to 87.512% when pulling 
**288989764948a982f29b868b3ad562f1c1ae4a8f on liubao68:edit-02** into 
**fc9c7f40f4d957152a602e68f3be889bf5b8c68f on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor use SPI to support extends

2018-05-31 Thread GitBox
liubao68 commented on a change in pull request #741: [SCB-625] ProduceProcessor 
use SPI to support extends
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/741#discussion_r192076932
 
 

 ##
 File path: 
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessorManager.java
 ##
 @@ -17,24 +17,43 @@
 
 package org.apache.servicecomb.common.rest.codec.produce;
 
+import java.util.ServiceLoader;
+
 import javax.ws.rs.core.MediaType;
 
 import org.apache.servicecomb.foundation.common.RegisterManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class ProduceProcessorManager extends RegisterManager {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ProduceProcessorManager.class);
+
+  private static final ServiceLoader produceProcessor = 
ServiceLoader.load(ProduceProcessor.class);
+
   private static final String NAME = "produce processor mgr";
 
   public static final String DEFAULT_TYPE = MediaType.APPLICATION_JSON;
 
   public static final ProduceProcessorManager INSTANCE = new 
ProduceProcessorManager();
 
-  public static final ProduceProcessor JSON_PROCESSOR = new 
ProduceJsonProcessor();
+  public static final ProduceProcessor JSON_PROCESSOR = 
chooseProduceProcessor(MediaType.APPLICATION_JSON);
 
-  public static final ProduceProcessor PLAIN_PROCESSOR = new 
ProduceTextPlainProcessor();
+  public static final ProduceProcessor PLAIN_PROCESSOR = 
chooseProduceProcessor(MediaType.TEXT_PLAIN);
 
   public static final ProduceProcessor DEFAULT_PROCESSOR = JSON_PROCESSOR;
 
   private ProduceProcessorManager() {
 super(NAME);
+produceProcessor.forEach(processor -> register(processor.getName(), 
processor));
+  }
+
+  public static ProduceProcessor chooseProduceProcessor(String type) {
+for (ProduceProcessor processor : produceProcessor) {
+  if (type.equals(processor.getName()))
+return processor;
+}
+LOGGER.error("Getting the current produceProcessor type {} failed, use 
default produceProcessor: application/json",
+type);
+return new ProduceJsonProcessor();
 
 Review comment:
   return JSON_PROCESSOR and maybe log as warning is better


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


With regards,
Apache Git Services


[GitHub] asifdxtreme commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
asifdxtreme commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393508353
 
 
   @WillemJiang then in that case we need to keep bower.json and whenever 
someone wants to develop or run the UI then they need to run bower install. So 
before making the release we need to run bower.install and then run the build 
scripts.
   Ultimatley the goal is to ship the dependencies in the release so that user 
doesn't needs to connect to internet to use the Frontend


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


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #743: [SCB-601] when java.lang.Error: not support def type: class io.swagger.models.ComposedMode we don't know which swagger

2018-05-31 Thread GitBox
liubao68 commented on a change in pull request #743: [SCB-601] when 
java.lang.Error: not support def type: class io.swagger.models.ComposedMode we 
don't know which swagger
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/743#discussion_r192074576
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -57,21 +57,26 @@
   private SwaggerToClassGenerator swaggerToClassGenerator;
 
   public SchemaMeta(Swagger swagger, MicroserviceMeta microserviceMeta, String 
schemaId) {
-this.packageName = SchemaUtils.generatePackageName(microserviceMeta, 
schemaId);
+try {
+  this.packageName = SchemaUtils.generatePackageName(microserviceMeta, 
schemaId);
 
-this.swagger = swagger;
-this.name = schemaId;
+  this.swagger = swagger;
+  this.name = schemaId;
 
-this.microserviceMeta = microserviceMeta;
-this.microserviceQualifiedName = microserviceMeta.getName() + "." + 
schemaId;
+  this.microserviceMeta = microserviceMeta;
+  this.microserviceQualifiedName = microserviceMeta.getName() + "." + 
schemaId;
 
-swaggerToClassGenerator = new 
SwaggerToClassGenerator(microserviceMeta.getClassLoader(), swagger, 
packageName);
-swaggerIntf = swaggerToClassGenerator.convert();
+  swaggerToClassGenerator = new 
SwaggerToClassGenerator(microserviceMeta.getClassLoader(), swagger, 
packageName);
+  swaggerIntf = swaggerToClassGenerator.convert();
 
-createOperationMgr("schemaMeta " + schemaId + " operation mgr");
-operationMgr.setRegisterErrorFmt("Operation name repeat, schema=%s, 
operation=%s");
+  createOperationMgr("schemaMeta " + schemaId + " operation mgr");
+  operationMgr.setRegisterErrorFmt("Operation name repeat, schema=%s, 
operation=%s");
 
-initOperations();
+  initOperations();
+} catch (Throwable e) {
 
 Review comment:
   This will be logger in main thread or by user code. Here do not need, or 
will print twice


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #744: [SCB-627] Client Request Timeout support for operation/schema/service level

2018-05-31 Thread GitBox
coveralls commented on issue #744: [SCB-627] Client Request Timeout support for 
operation/schema/service level
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/744#issuecomment-393504515
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17249826/badge)](https://coveralls.io/builds/17249826)
   
   Coverage increased (+0.06%) to 87.585% when pulling 
**a2c345e82b27581bb6d1d1f7beaed5a45210f602 on maheshrajus:master** into 
**fc9c7f40f4d957152a602e68f3be889bf5b8c68f on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #743: [SCB-601] when java.lang.Error: not support def type: class io.swagger.models.ComposedMode we don't know which swagger

2018-05-31 Thread GitBox
WillemJiang commented on a change in pull request #743: [SCB-601] when 
java.lang.Error: not support def type: class io.swagger.models.ComposedMode we 
don't know which swagger
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/743#discussion_r192047265
 
 

 ##
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##
 @@ -57,21 +57,26 @@
   private SwaggerToClassGenerator swaggerToClassGenerator;
 
   public SchemaMeta(Swagger swagger, MicroserviceMeta microserviceMeta, String 
schemaId) {
-this.packageName = SchemaUtils.generatePackageName(microserviceMeta, 
schemaId);
+try {
+  this.packageName = SchemaUtils.generatePackageName(microserviceMeta, 
schemaId);
 
-this.swagger = swagger;
-this.name = schemaId;
+  this.swagger = swagger;
+  this.name = schemaId;
 
-this.microserviceMeta = microserviceMeta;
-this.microserviceQualifiedName = microserviceMeta.getName() + "." + 
schemaId;
+  this.microserviceMeta = microserviceMeta;
+  this.microserviceQualifiedName = microserviceMeta.getName() + "." + 
schemaId;
 
-swaggerToClassGenerator = new 
SwaggerToClassGenerator(microserviceMeta.getClassLoader(), swagger, 
packageName);
-swaggerIntf = swaggerToClassGenerator.convert();
+  swaggerToClassGenerator = new 
SwaggerToClassGenerator(microserviceMeta.getClassLoader(), swagger, 
packageName);
+  swaggerIntf = swaggerToClassGenerator.convert();
 
-createOperationMgr("schemaMeta " + schemaId + " operation mgr");
-operationMgr.setRegisterErrorFmt("Operation name repeat, schema=%s, 
operation=%s");
+  createOperationMgr("schemaMeta " + schemaId + " operation mgr");
+  operationMgr.setRegisterErrorFmt("Operation name repeat, schema=%s, 
operation=%s");
 
-initOperations();
+  initOperations();
+} catch (Throwable e) {
 
 Review comment:
   It's better to log the error with the exception, so we can get the stack 
trace of it.


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


With regards,
Apache Git Services


[GitHub] WillemJiang commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
WillemJiang commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393475693
 
 
   If you check the README of the first 3 java script , there are some License 
information there.
   Most of them are using MIT License.
   
   According to https://jquery.org/license/ , jquery uses MIT License.
   According to https://github.com/jeremyfa/yaml.js/blob/develop/LICENSE, 
yaml.js uses MIT License.
   
   I don't think you need add the source code into the service-center, we could 
add the dependencies here, using node to build the js code for us.


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
codecov-io commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393449869
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=h1)
 Report
   > Merging 
[#363](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b87ea66f7834d893aab7aa864df272e1c5ad9106?src=pr=desc)
 will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/graphs/tree.svg?width=650=150=GAaF7zrg8R=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
   
   ```diff
   @@   Coverage Diff   @@
   ##   master #363   +/-   ##
   ===
 Coverage   69.33%   69.33%   
   ===
 Files  18   18   
 Lines3437 3437   
   ===
 Hits 2383 2383   
 Misses885  885   
 Partials  169  169
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=footer).
 Last update 
[b87ea66...88d8c21](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
coveralls commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393450688
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17247543/badge)](https://coveralls.io/builds/17247543)
   
   Coverage decreased (-0.007%) to 72.902% when pulling 
**88d8c21398ca52693be83b3cfe6c84096ae4284e on asifdxtreme:master** into 
**b87ea66f7834d893aab7aa864df272e1c5ad9106 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #743: [SCB-601] when java.lang.Error: not support def type: class io.swagger.models.ComposedMode we don't know which swagger

2018-05-31 Thread GitBox
coveralls commented on issue #743: [SCB-601] when java.lang.Error: not support 
def type: class io.swagger.models.ComposedMode we don't know which swagger
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/743#issuecomment-393460070
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17247486/badge)](https://coveralls.io/builds/17247486)
   
   Coverage decreased (-0.01%) to 87.508% when pulling 
**1c58b27fa56cd02cb2c4c45c932a43b586ee22e8 on liubao68:edit-02** into 
**fc9c7f40f4d957152a602e68f3be889bf5b8c68f on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] maheshrajus opened a new pull request #744: [SCB-627] Client Request Timeout support for operation/schema/service level

2018-05-31 Thread GitBox
maheshrajus opened a new pull request #744: [SCB-627] Client Request Timeout 
support for operation/schema/service level
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/744
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [x] Each commit in the pull request should have a meaningful subject line 
and body.
- [x] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [x] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [x] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
codecov-io commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393449869
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=h1)
 Report
   > Merging 
[#363](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b87ea66f7834d893aab7aa864df272e1c5ad9106?src=pr=desc)
 will **increase** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/graphs/tree.svg?token=GAaF7zrg8R=650=pr=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #363  +/-   ##
   ==
   + Coverage   69.33%   69.36%   +0.02% 
   ==
 Files  18   18  
 Lines3437 3437  
   ==
   + Hits 2383 2384   +1 
 Misses885  885  
   + Partials  169  168   -1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[server/service/rule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZS5nbw==)
 | `77.25% <0%> (+0.42%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=footer).
 Last update 
[b87ea66...7ec30a7](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
coveralls commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393450688
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17247280/badge)](https://coveralls.io/builds/17247280)
   
   Coverage increased (+0.1%) to 73.01% when pulling 
**7ec30a70f750cb840bd51249dc5f63e8ddde36fb on asifdxtreme:master** into 
**b87ea66f7834d893aab7aa864df272e1c5ad9106 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
coveralls commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393450688
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/17247185/badge)](https://coveralls.io/builds/17247185)
   
   Coverage remained the same at 72.908% when pulling 
**788aab06e6ff252334971df77625537c1526f76d on asifdxtreme:master** into 
**b87ea66f7834d893aab7aa864df272e1c5ad9106 on apache:master**.
   


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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
codecov-io commented on issue #363: SCB-460 Add bower_components
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/363#issuecomment-393449869
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=h1)
 Report
   > Merging 
[#363](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/b87ea66f7834d893aab7aa864df272e1c5ad9106?src=pr=desc)
 will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363/graphs/tree.svg?width=650=150=pr=GAaF7zrg8R)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=tree)
   
   ```diff
   @@   Coverage Diff   @@
   ##   master #363   +/-   ##
   ===
 Coverage   69.33%   69.33%   
   ===
 Files  18   18   
 Lines3437 3437   
   ===
 Hits 2383 2383   
 Misses885  885   
 Partials  169  169
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=footer).
 Last update 
[b87ea66...7ec30a7](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/363?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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


With regards,
Apache Git Services


[GitHub] liubao68 opened a new pull request #743: [SCB-601] when java.lang.Error: not support def type: class io.swagger.models.ComposedMode we don't know which swagger

2018-05-31 Thread GitBox
liubao68 opened a new pull request #743: [SCB-601] when java.lang.Error: not 
support def type: class io.swagger.models.ComposedMode we don't know which 
swagger
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/743
 
 
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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


With regards,
Apache Git Services


[GitHub] asifdxtreme opened a new pull request #363: SCB-460 Add bower_components

2018-05-31 Thread GitBox
asifdxtreme opened a new pull request #363: SCB-460 Add bower_components
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/363
 
 
   ## TODO
- [ ] Update the release license
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [x] Each commit in the pull request should have a meaningful subject line 
and body.
- [x] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [x] Run `go build` `go test` `go fmt` `go vet` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
- [x] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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


With regards,
Apache Git Services


[GitHub] asifdxtreme closed pull request #362: SCB-620 Switch to new client gracefully

2018-05-31 Thread GitBox
asifdxtreme closed pull request #362: SCB-620 Switch to new client gracefully
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/362
 
 
   

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/server/plugin/infra/registry/etcd/etcd.go 
b/server/plugin/infra/registry/etcd/etcd.go
index 9243edbd..ffe1367a 100644
--- a/server/plugin/infra/registry/etcd/etcd.go
+++ b/server/plugin/infra/registry/etcd/etcd.go
@@ -600,13 +600,14 @@ hcLoop:
util.Logger().Errorf(cerr, "re-get etcd client 
%v failed.", c.Endpoints)
continue
}
-   cerr = c.Client.Close()
-   if cerr != nil {
-   util.Logger().Errorf(cerr, "close unavailable 
etcd client failed.")
-   }
-   c.Client = client
 
+   c.Client, client = client, c.Client
util.Logger().Errorf(err, "Auto sync etcd members 
failed and re-connected etcd successfully")
+
+   if cerr = client.Close(); cerr != nil {
+   util.Logger().Errorf(cerr, "close unavailable 
etcd client failed.")
+   }
+   client = nil
}
}
 }


 


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


With regards,
Apache Git Services


[incubator-servicecomb-service-center] branch master updated: SCB-620 Switch to new client gracefully (#362)

2018-05-31 Thread asifdxtreme
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b87ea66  SCB-620 Switch to new client gracefully (#362)
b87ea66 is described below

commit b87ea66f7834d893aab7aa864df272e1c5ad9106
Author: little-cui 
AuthorDate: Thu May 31 15:06:46 2018 +0800

SCB-620 Switch to new client gracefully (#362)
---
 server/plugin/infra/registry/etcd/etcd.go | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/server/plugin/infra/registry/etcd/etcd.go 
b/server/plugin/infra/registry/etcd/etcd.go
index 9243edb..ffe1367 100644
--- a/server/plugin/infra/registry/etcd/etcd.go
+++ b/server/plugin/infra/registry/etcd/etcd.go
@@ -600,13 +600,14 @@ hcLoop:
util.Logger().Errorf(cerr, "re-get etcd client 
%v failed.", c.Endpoints)
continue
}
-   cerr = c.Client.Close()
-   if cerr != nil {
-   util.Logger().Errorf(cerr, "close unavailable 
etcd client failed.")
-   }
-   c.Client = client
 
+   c.Client, client = client, c.Client
util.Logger().Errorf(err, "Auto sync etcd members 
failed and re-connected etcd successfully")
+
+   if cerr = client.Close(); cerr != nil {
+   util.Logger().Errorf(cerr, "close unavailable 
etcd client failed.")
+   }
+   client = nil
}
}
 }

-- 
To stop receiving notification emails like this one, please contact
asifdxtr...@apache.org.


[incubator-servicecomb-java-chassis] branch master updated: [SCB-601] print more specific logs when there are too many schema in environment

2018-05-31 Thread liubao
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new fc9c7f4  [SCB-601] print more specific logs when there are too many 
schema in environment
fc9c7f4 is described below

commit fc9c7f40f4d957152a602e68f3be889bf5b8c68f
Author: liubao 
AuthorDate: Thu May 31 11:32:59 2018 +0800

[SCB-601] print more specific logs when there are too many schema in 
environment
---
 .../apache/servicecomb/common/rest/definition/RestOperationMeta.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
index ffc89be..ee7c401 100644
--- 
a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
+++ 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
@@ -85,7 +85,8 @@ public class RestOperationMeta {
 Method method = operationMeta.getMethod();
 Type[] genericParamTypes = method.getGenericParameterTypes();
 if (genericParamTypes.length != operation.getParameters().size()) {
-  throw new Error("Param count is not equal between swagger and method,  
path=" + absolutePath);
+  throw new Error("Param count is not equal between swagger and method, 
path=" + absolutePath
++ ";operation=" + operationMeta.getMicroserviceQualifiedName());
 }
 
 // 初始化所有rest param

-- 
To stop receiving notification emails like this one, please contact
liu...@apache.org.


[GitHub] liubao68 closed pull request #742: [SCB-601] print more specific logs when there are too many schema in environment

2018-05-31 Thread GitBox
liubao68 closed pull request #742: [SCB-601] print more specific logs when 
there are too many schema in environment
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/742
 
 
   

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/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
index ffc89be90..ee7c40137 100644
--- 
a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
+++ 
b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/definition/RestOperationMeta.java
@@ -85,7 +85,8 @@ public void init(OperationMeta operationMeta) {
 Method method = operationMeta.getMethod();
 Type[] genericParamTypes = method.getGenericParameterTypes();
 if (genericParamTypes.length != operation.getParameters().size()) {
-  throw new Error("Param count is not equal between swagger and method,  
path=" + absolutePath);
+  throw new Error("Param count is not equal between swagger and method, 
path=" + absolutePath
++ ";operation=" + operationMeta.getMicroserviceQualifiedName());
 }
 
 // 初始化所有rest param


 


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


With regards,
Apache Git Services


[incubator-servicecomb-saga] 04/04: SCB-568 Provide web page for pack Demo, use the jquery file hosted in CDN

2018-05-31 Thread ningjiang
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 2bf0901dc629be116d63725ba20843a571543b03
Author: longchun 
AuthorDate: Thu May 31 12:45:41 2018 +0800

SCB-568 Provide web page for pack Demo, use the jquery file hosted in CDN
---
 saga-demo/booking/booking/src/main/resources/static/index.html   | 2 +-
 saga-demo/booking/booking/src/main/resources/static/js/jquery.min.js | 5 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/saga-demo/booking/booking/src/main/resources/static/index.html 
b/saga-demo/booking/booking/src/main/resources/static/index.html
index 2c92b69..894667f 100644
--- a/saga-demo/booking/booking/src/main/resources/static/index.html
+++ b/saga-demo/booking/booking/src/main/resources/static/index.html
@@ -20,7 +20,7 @@
 
 Saga-booking-demo
 
-
+http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js";>
 
 

[incubator-servicecomb-saga] 01/04: SCB-568 Provide web page for pack Demo

2018-05-31 Thread ningjiang
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 850adde4a9e1e5f560c390f64f705b63984c72d2
Author: longchun 
AuthorDate: Tue May 29 15:46:52 2018 +0800

SCB-568 Provide web page for pack Demo
---
 .../booking/src/main/resources/static/index.html   | 87 ++
 .../src/main/resources/static/js/jquery.min.js |  5 ++
 2 files changed, 92 insertions(+)

diff --git a/saga-demo/booking/booking/src/main/resources/static/index.html 
b/saga-demo/booking/booking/src/main/resources/static/index.html
new file mode 100644
index 000..417f5bd
--- /dev/null
+++ b/saga-demo/booking/booking/src/main/resources/static/index.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+Saga-booking-demo
+
+
+
+
+function testCase1() {
+$.post("http://127.0.0.1:8083/booking/test/2/2";, function(data) {
+var msg = data;
+$("#booking_result_1").html(msg);
+});
+}
+
+function testCase2() {
+$.post("http://127.0.0.1:8083/booking/test/3/2";, function(data) {
+var msg = data;
+$("#booking_result_2").html(msg);
+});
+}
+
+function room_booking_result() {
+$.get("http://127.0.0.1:8081/bookings";, function(data) {
+var msg = "
  • " + data + "
  • "; +$("#room_list").html(msg); +}); +} + +function car_booking_result() { +$.get("http://127.0.0.1:8082/bookings";, function(data) { +var msg = "
  • " + data + "
  • "; +$("#car_list").html(msg); +}); +} + + + +Test cases of Sage booking demo: +Case 1. [Booking 2 rooms and 2 cars, will done successfully] + +Booking result: ### + + +Case 2. [Booking 3 rooms and 2 cars, hotel order service will failed.] + +Booking result: ### + + +[Query the room booking result] + +Room booking list: + + +#Name, Amount, Confirm status, Cancel Status + + + + +[Query the car booking result] + +Car booking list: + + +#Name, Amount, Confirm status, Cancel Status + + + + + diff --git a/saga-demo/booking/booking/src/main/resources/static/js/jquery.min.js b/saga-demo/booking/booking/src/main/resources/static/js/jquery.min.js new file mode 100755 index 000..0f60b7b --- /dev/null +++ b/saga-demo/booking/booking/src/main/resources/static/js/jquery.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b [...] + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&if(k&[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}fu [...] +return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a, [...] -- To stop receiving notification emails like this one, please contact ningji...@apache.org.

    [incubator-servicecomb-saga] 03/04: SCB-568 Provide web page for pack Demo, modified README accordingly

    2018-05-31 Thread ningjiang
    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 c9d70456d32a5945b8781cffbe0c1de6f4c569cc
    Author: longchun 
    AuthorDate: Tue May 29 21:58:13 2018 +0800
    
    SCB-568 Provide web page for pack Demo, modified README accordingly
    ---
     saga-demo/booking/README.md | 5 -
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/saga-demo/booking/README.md b/saga-demo/booking/README.md
    index 161f886..b72c62e 100644
    --- a/saga-demo/booking/README.md
    +++ b/saga-demo/booking/README.md
    @@ -91,7 +91,7 @@ You can run the demo using either docker compose or 
    executable files.
    java -Dserver.port=8083 -Dalpha.cluster.address=${alpha_address}:8080 
    -Dcar.service.address=${host_address}:8082 
    -Dhotel.service.address=${host_address}:8081  -jar 
    pack-booking-${saga_version}-exec.jar
    ```
     
    -## User Requests
    +## User Requests by command line tools
     1. Booking 2 rooms and 2 cars, this booking will be OK.
     ```
     curl -X POST http://${host_address}:8083/booking/test/2/2
    @@ -120,5 +120,8 @@ curl http://${host_address}:8082/bookings
     ```
     The second car booking will be marked with **cancel:true**
     
    +## User Requests by html page
    +
    +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.
    
    -- 
    To stop receiving notification emails like this one, please contact
    ningji...@apache.org.
    
    

    [incubator-servicecomb-saga] branch master updated (d1bbf4f -> 2bf0901)

    2018-05-31 Thread ningjiang
    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 d1bbf4f  SCB-475 Add section for downloading latest release in README
     new 850adde  SCB-568 Provide web page for pack Demo
     new 03a5ee7  SCB-568 Provide web page for pack Demo, fixed the cros-site 
    issue.
     new c9d7045  SCB-568 Provide web page for pack Demo, modified README 
    accordingly
     new 2bf0901  SCB-568 Provide web page for pack Demo, use the jquery file 
    hosted in CDN
    
    The 4 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:
     saga-demo/booking/README.md|  5 +-
     .../saga/demo/pack/booking/MyConfiguration.java| 23 --
     .../booking/src/main/resources/static/index.html   | 91 ++
     .../saga/demo/pack/car/CarBookingController.java   |  2 +
     .../demo/pack/hotel/HotelBookingController.java|  2 +
     5 files changed, 114 insertions(+), 9 deletions(-)
     copy 
    omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/MisconfiguredAnnotation.java
     => 
    saga-demo/booking/booking/src/main/java/org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java
     (59%)
     create mode 100644 
    saga-demo/booking/booking/src/main/resources/static/index.html
    
    -- 
    To stop receiving notification emails like this one, please contact
    ningji...@apache.org.
    
    

    [GitHub] WillemJiang closed pull request #195: SCB-568 Provide web page for pack Demo

    2018-05-31 Thread GitBox
    WillemJiang closed pull request #195: SCB-568 Provide web page for pack Demo
    URL: https://github.com/apache/incubator-servicecomb-saga/pull/195
     
     
       
    
    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/saga-demo/booking/README.md b/saga-demo/booking/README.md
    index 161f886c..b72c62e6 100644
    --- a/saga-demo/booking/README.md
    +++ b/saga-demo/booking/README.md
    @@ -91,7 +91,7 @@ You can run the demo using either docker compose or 
    executable files.
    java -Dserver.port=8083 -Dalpha.cluster.address=${alpha_address}:8080 
    -Dcar.service.address=${host_address}:8082 
    -Dhotel.service.address=${host_address}:8081  -jar 
    pack-booking-${saga_version}-exec.jar
    ```
     
    -## User Requests
    +## User Requests by command line tools
     1. Booking 2 rooms and 2 cars, this booking will be OK.
     ```
     curl -X POST http://${host_address}:8083/booking/test/2/2
    @@ -120,5 +120,8 @@ curl http://${host_address}:8082/bookings
     ```
     The second car booking will be marked with **cancel:true**
     
    +## User Requests by html page
    +
    +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.
    diff --git 
    a/saga-demo/booking/booking/src/main/java/org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java
     
    b/saga-demo/booking/booking/src/main/java/org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java
    new file mode 100644
    index ..0fc5e09c
    --- /dev/null
    +++ 
    b/saga-demo/booking/booking/src/main/java/org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java
    @@ -0,0 +1,36 @@
    +/*
    + * 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.pack.booking;
    +
    +import org.springframework.context.annotation.Bean;
    +import org.springframework.context.annotation.Configuration;
    +import org.springframework.web.servlet.config.annotation.CorsRegistry;
    +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
    +import 
    org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
    +
    +@Configuration
    +public class MyConfiguration {
    +  @Bean
    +  public WebMvcConfigurer corsConfigurer() {
    +return new WebMvcConfigurerAdapter() {
    +  @Override
    +  public void addCorsMappings(CorsRegistry registry) {
    +registry.addMapping("/**");
    +  }
    +};
    +  }
    +}
    diff --git a/saga-demo/booking/booking/src/main/resources/static/index.html 
    b/saga-demo/booking/booking/src/main/resources/static/index.html
    new file mode 100644
    index ..894667f0
    --- /dev/null
    +++ b/saga-demo/booking/booking/src/main/resources/static/index.html
    @@ -0,0 +1,91 @@
    +
    +
    +
    +
    +
    +Saga-booking-demo
    +
    +http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js";>
    +
    +
    +function testCase1() {
    +$.post("http://127.0.0.1:8083/booking/test/2/2";, function(data) {
    +var msg = data;
    +$("#booking_result_1").html(msg);
    +});
    +}
    +
    +function testCase2() {
    +$.post("http://127.0.0.1:8083/booking/test/3/2";, function(data) {
    +var msg = data;
    +$("#booking_result_2").html(msg);
    +})
    +.fail(function(data) {
    +alert("The transaction is failed");
    +$("#booking_result_2").html("
  • " + JSON.stringify(data) + "
  • "); +}); +} + +function room_booking_result() { +$.get("http://127.0.0.1:8081/bookings";, function(data) { +var msg = "
  • " + JSON.stringify(data) + "
  • "; +$("#room_list").html(msg); +}); +} + +function car_booking_result() { +

    [incubator-servicecomb-saga] 02/04: SCB-568 Provide web page for pack Demo, fixed the cros-site issue.

    2018-05-31 Thread ningjiang
    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 03a5ee7b8a5d139e7157ff5ca8938dfcd8c9a1fd
    Author: longchun 
    AuthorDate: Tue May 29 18:02:23 2018 +0800
    
    SCB-568 Provide web page for pack Demo, fixed the cros-site issue.
    ---
     .../saga/demo/pack/booking/MyConfiguration.java| 36 ++
     .../booking/src/main/resources/static/index.html   |  8 +++--
     .../saga/demo/pack/car/CarBookingController.java   |  2 ++
     .../demo/pack/hotel/HotelBookingController.java|  2 ++
     4 files changed, 46 insertions(+), 2 deletions(-)
    
    diff --git 
    a/saga-demo/booking/booking/src/main/java/org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java
     
    b/saga-demo/booking/booking/src/main/java/org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java
    new file mode 100644
    index 000..0fc5e09
    --- /dev/null
    +++ 
    b/saga-demo/booking/booking/src/main/java/org/apache/servicecomb/saga/demo/pack/booking/MyConfiguration.java
    @@ -0,0 +1,36 @@
    +/*
    + * 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.pack.booking;
    +
    +import org.springframework.context.annotation.Bean;
    +import org.springframework.context.annotation.Configuration;
    +import org.springframework.web.servlet.config.annotation.CorsRegistry;
    +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
    +import 
    org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
    +
    +@Configuration
    +public class MyConfiguration {
    +  @Bean
    +  public WebMvcConfigurer corsConfigurer() {
    +return new WebMvcConfigurerAdapter() {
    +  @Override
    +  public void addCorsMappings(CorsRegistry registry) {
    +registry.addMapping("/**");
    +  }
    +};
    +  }
    +}
    diff --git a/saga-demo/booking/booking/src/main/resources/static/index.html 
    b/saga-demo/booking/booking/src/main/resources/static/index.html
    index 417f5bd..2c92b69 100644
    --- a/saga-demo/booking/booking/src/main/resources/static/index.html
    +++ b/saga-demo/booking/booking/src/main/resources/static/index.html
    @@ -34,19 +34,23 @@
     $.post("http://127.0.0.1:8083/booking/test/3/2;, function(data) {
     var msg = data;
     $("#booking_result_2").html(msg);
    +})
    +.fail(function(data) {
    +alert("The transaction is failed");
    +$("#booking_result_2").html("" + JSON.stringify(data) + 
    "");
     });
     }
     
     function room_booking_result() {
     $.get("http://127.0.0.1:8081/bookings;, function(data) {
    -var msg = "" + data + "";
    +var msg = "" + JSON.stringify(data) + "";
     $("#room_list").html(msg);
     });
     }
     
     function car_booking_result() {
     $.get("http://127.0.0.1:8082/bookings;, function(data) {
    -var msg = "" + data + "";
    +var msg = "" + JSON.stringify(data) + "";
     $("#car_list").html(msg);
     });
     }
    diff --git 
    a/saga-demo/booking/car/src/main/java/org/apache/servicecomb/saga/demo/pack/car/CarBookingController.java
     
    b/saga-demo/booking/car/src/main/java/org/apache/servicecomb/saga/demo/pack/car/CarBookingController.java
    index 4528c22..9db37b3 100644
    --- 
    a/saga-demo/booking/car/src/main/java/org/apache/servicecomb/saga/demo/pack/car/CarBookingController.java
    +++ 
    b/saga-demo/booking/car/src/main/java/org/apache/servicecomb/saga/demo/pack/car/CarBookingController.java
    @@ -18,6 +18,7 @@
     package org.apache.servicecomb.saga.demo.pack.car;
     
     import org.springframework.beans.factory.annotation.Autowired;
    +import org.springframework.web.bind.annotation.CrossOrigin;
     import org.springframework.web.bind.annotation.DeleteMapping;
     import org.springframework.web.bind.annotation.GetMapping;
     import org.springframework.web.bind.annotation.PathVariable;
    @@ -35,6 +36,7 @@ public class CarBookingController {
     
       private final AtomicInteger id = new AtomicInteger(0);
     
    +  @CrossOrigin
       @GetMapping("/bookings") List getAll() {
     return new ArrayList<>(service.getAllBookings());