Loading pom.xml +12 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ <jpa.version>1.0.0.Final</jpa.version> <hibernate.version>4.3.11.Final</hibernate.version> <seata.version>0.5.1</seata.version> <junit.version>4.12</junit.version> <hamcrest.version>1.3</hamcrest.version> <mockito.version>2.7.21</mockito.version> Loading Loading @@ -201,6 +203,16 @@ <artifactId>mybatis-spring-boot-starter</artifactId> <version>${mybatis-spring.version}</version> </dependency> <dependency> <groupId>io.seata</groupId> <artifactId>seata-rm-datasource</artifactId> <version>${seata.version}</version> </dependency> <dependency> <groupId>io.seata</groupId> <artifactId>seata-tm</artifactId> <version>${seata.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> Loading sharding-jdbc-example/transaction-example/transaction-base-seata-example/pom.xml +11 −0 Original line number Diff line number Diff line Loading @@ -31,4 +31,15 @@ <modules> <module>transaction-base-seata-raw-jdbc-example</module> </modules> <dependencies> <dependency> <groupId>io.seata</groupId> <artifactId>seata-rm-datasource</artifactId> </dependency> <dependency> <groupId>io.seata</groupId> <artifactId>seata-tm</artifactId> </dependency> </dependencies> </project> sharding-jdbc-example/transaction-example/transaction-base-seata-example/transaction-base-seata-raw-jdbc-example/pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>transaction-base-seata-example</artifactId> <groupId>org.apache.shardingsphere.example</groupId> <artifactId>transaction-base-seata-example</artifactId> <version>4.0.0-RC2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> Loading sharding-jdbc-example/transaction-example/transaction-base-seata-example/transaction-base-seata-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/base/seata/raw/jdbc/YamlConfigurationTransactionExample.java +5 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.concurrent.locks.LockSupport; /* Please startup seata-server( before running this example. Download seata-server from here https://github.com/seata/seata/releases */ public class YamlConfigurationTransactionExample { private static String configFile = "/META-INF/sharding-databases-tables.yaml"; Loading Loading @@ -66,7 +70,7 @@ public class YamlConfigurationTransactionExample { insertSuccess(connection, commonService); connection.commit(); } LockSupport.parkUntil(System.currentTimeMillis() + 3000); LockSupport.parkUntil(System.currentTimeMillis() + 1000); truncateTable(dataSource); System.out.println("------############## End seata succeed transaction ######################------"); System.out.println("------############## Start seata failure transaction ############------"); Loading Loading
pom.xml +12 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ <jpa.version>1.0.0.Final</jpa.version> <hibernate.version>4.3.11.Final</hibernate.version> <seata.version>0.5.1</seata.version> <junit.version>4.12</junit.version> <hamcrest.version>1.3</hamcrest.version> <mockito.version>2.7.21</mockito.version> Loading Loading @@ -201,6 +203,16 @@ <artifactId>mybatis-spring-boot-starter</artifactId> <version>${mybatis-spring.version}</version> </dependency> <dependency> <groupId>io.seata</groupId> <artifactId>seata-rm-datasource</artifactId> <version>${seata.version}</version> </dependency> <dependency> <groupId>io.seata</groupId> <artifactId>seata-tm</artifactId> <version>${seata.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> Loading
sharding-jdbc-example/transaction-example/transaction-base-seata-example/pom.xml +11 −0 Original line number Diff line number Diff line Loading @@ -31,4 +31,15 @@ <modules> <module>transaction-base-seata-raw-jdbc-example</module> </modules> <dependencies> <dependency> <groupId>io.seata</groupId> <artifactId>seata-rm-datasource</artifactId> </dependency> <dependency> <groupId>io.seata</groupId> <artifactId>seata-tm</artifactId> </dependency> </dependencies> </project>
sharding-jdbc-example/transaction-example/transaction-base-seata-example/transaction-base-seata-raw-jdbc-example/pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>transaction-base-seata-example</artifactId> <groupId>org.apache.shardingsphere.example</groupId> <artifactId>transaction-base-seata-example</artifactId> <version>4.0.0-RC2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> Loading
sharding-jdbc-example/transaction-example/transaction-base-seata-example/transaction-base-seata-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/base/seata/raw/jdbc/YamlConfigurationTransactionExample.java +5 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.concurrent.locks.LockSupport; /* Please startup seata-server( before running this example. Download seata-server from here https://github.com/seata/seata/releases */ public class YamlConfigurationTransactionExample { private static String configFile = "/META-INF/sharding-databases-tables.yaml"; Loading Loading @@ -66,7 +70,7 @@ public class YamlConfigurationTransactionExample { insertSuccess(connection, commonService); connection.commit(); } LockSupport.parkUntil(System.currentTimeMillis() + 3000); LockSupport.parkUntil(System.currentTimeMillis() + 1000); truncateTable(dataSource); System.out.println("------############## End seata succeed transaction ######################------"); System.out.println("------############## Start seata failure transaction ############------"); Loading