You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/09/15 02:44:22 UTC
[incubator-servicecomb-saga] 01/01: Switch the TCC demo JPA
implementation to eclipse link
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch SCB-913
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
commit a0328ea011ed052afc18f6c1cab760bd1b2dabba
Author: Willem Jiang <ji...@huawei.com>
AuthorDate: Sat Sep 15 10:24:23 2018 +0800
Switch the TCC demo JPA implementation to eclipse link
---
saga-demo/tcc-spring-demo/inventory/pom.xml | 22 ++++++++++++++++++++++
.../inventory/src/main/resources/application.yaml | 5 ++---
saga-demo/tcc-spring-demo/ordering/pom.xml | 1 -
saga-demo/tcc-spring-demo/payment/pom.xml | 22 ++++++++++++++++++++++
.../payment/src/main/resources/application.yaml | 6 +-----
saga-demo/tcc-spring-demo/pom.xml | 4 ----
6 files changed, 47 insertions(+), 13 deletions(-)
diff --git a/saga-demo/tcc-spring-demo/inventory/pom.xml b/saga-demo/tcc-spring-demo/inventory/pom.xml
index ca43065..497eeac 100644
--- a/saga-demo/tcc-spring-demo/inventory/pom.xml
+++ b/saga-demo/tcc-spring-demo/inventory/pom.xml
@@ -45,12 +45,30 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb.saga</groupId>
+ <artifactId>saga-persistence-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.apache.servicecomb.saga</groupId>
<artifactId>omega-transport-resttemplate</artifactId>
</dependency>
<dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>org.eclipse.persistence.jpa</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
@@ -81,6 +99,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>com.ethlo.persistence.tools</groupId>
+ <artifactId>eclipselink-maven-plugin</artifactId>
+ </plugin>
</plugins>
</build>
diff --git a/saga-demo/tcc-spring-demo/inventory/src/main/resources/application.yaml b/saga-demo/tcc-spring-demo/inventory/src/main/resources/application.yaml
index fd05d0b..aac174e 100644
--- a/saga-demo/tcc-spring-demo/inventory/src/main/resources/application.yaml
+++ b/saga-demo/tcc-spring-demo/inventory/src/main/resources/application.yaml
@@ -23,9 +23,8 @@ spring:
console:
enabled: true
jpa:
- properties:
- eclipselink:
- ddl-generation: none
+ show-sql: true
+ generate-ddl: true
alpha:
cluster:
diff --git a/saga-demo/tcc-spring-demo/ordering/pom.xml b/saga-demo/tcc-spring-demo/ordering/pom.xml
index 90fea50..93a65e3 100644
--- a/saga-demo/tcc-spring-demo/ordering/pom.xml
+++ b/saga-demo/tcc-spring-demo/ordering/pom.xml
@@ -46,7 +46,6 @@
<groupId>org.apache.servicecomb.saga</groupId>
<artifactId>omega-transport-resttemplate</artifactId>
</dependency>
-
</dependencies>
<build>
diff --git a/saga-demo/tcc-spring-demo/payment/pom.xml b/saga-demo/tcc-spring-demo/payment/pom.xml
index 087bdf5..fa871cf 100644
--- a/saga-demo/tcc-spring-demo/payment/pom.xml
+++ b/saga-demo/tcc-spring-demo/payment/pom.xml
@@ -47,6 +47,20 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb.saga</groupId>
+ <artifactId>saga-persistence-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
@@ -57,6 +71,10 @@
<artifactId>javax.persistence-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>org.eclipse.persistence.jpa</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<scope>test</scope>
@@ -75,6 +93,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>com.ethlo.persistence.tools</groupId>
+ <artifactId>eclipselink-maven-plugin</artifactId>
+ </plugin>
</plugins>
</build>
diff --git a/saga-demo/tcc-spring-demo/payment/src/main/resources/application.yaml b/saga-demo/tcc-spring-demo/payment/src/main/resources/application.yaml
index 474a8df..1261a10 100644
--- a/saga-demo/tcc-spring-demo/payment/src/main/resources/application.yaml
+++ b/saga-demo/tcc-spring-demo/payment/src/main/resources/application.yaml
@@ -25,11 +25,7 @@ spring:
jpa:
show-sql: true
generate-ddl: true
- hibernate:
- ddl-auto: create-drop
- naming:
- physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
- implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
+
alpha:
cluster:
address: alpha-server.servicecomb.io:8080
diff --git a/saga-demo/tcc-spring-demo/pom.xml b/saga-demo/tcc-spring-demo/pom.xml
index a020802..2883230 100644
--- a/saga-demo/tcc-spring-demo/pom.xml
+++ b/saga-demo/tcc-spring-demo/pom.xml
@@ -39,9 +39,5 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-tcnative-boringssl-static</artifactId>
- </dependency>
</dependencies>
</project>