Skip to content

Commit

Permalink
Rename fescar to seata (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangthen committed Apr 22, 2019
1 parent 351c7db commit f9e99a7
Show file tree
Hide file tree
Showing 247 changed files with 2,886 additions and 1,321 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,7 +2,7 @@ language: java
sudo: false

jdk:
- openjdk11
# - openjdk11
- openjdk8

install: true
Expand Down
2 changes: 1 addition & 1 deletion dubbo/README.md
@@ -1,6 +1,6 @@
# dubbo

How to use Fescar to ensure consistency between Dubbo Microservices ?
How to use Seata to ensure consistency between Dubbo Microservices ?

Please see the blog:
Engligh: http://dubbo.apache.org/en-us/blog/dubbo-fescar.html
Expand Down
16 changes: 8 additions & 8 deletions dubbo/pom.xml
Expand Up @@ -18,22 +18,22 @@
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>
<groupId>com.alibaba.fescar</groupId>
<artifactId>fescar-samples</artifactId>
<groupId>io.seata</groupId>
<artifactId>seata-samples</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fescar-samples-dubbo</artifactId>
<artifactId>seata-samples-dubbo</artifactId>
<packaging>jar</packaging>
<name>fescar-samples-dubbo ${project.version}</name>
<name>seata-samples-dubbo ${project.version}</name>
<dependencies>
<dependency>
<groupId>com.alibaba.fescar</groupId>
<artifactId>fescar-spring</artifactId>
<groupId>io.seata</groupId>
<artifactId>seata-spring</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.fescar</groupId>
<artifactId>fescar-dubbo</artifactId>
<groupId>io.seata</groupId>
<artifactId>seata-dubbo</artifactId>
</dependency>
<dependency>
<groupId>com.101tec</groupId>
Expand Down
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.tcc;
package io.seata.samples.dubbo;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.AbstractApplicationContext;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

/**
* The type Application keeper.
*/
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.nacos;
package io.seata.samples.dubbo;

import java.io.Serializable;

Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.nacos.service;
package io.seata.samples.dubbo.service;

/**
* The interface Account service.
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.nacos.service;
package io.seata.samples.dubbo.service;

/**
* The interface Business service.
Expand Down
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.service;
package io.seata.samples.dubbo.service;

import com.alibaba.fescar.samples.dubbo.Order;
import io.seata.samples.dubbo.Order;

/**
* The interface Order service.
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.service;
package io.seata.samples.dubbo.service;

/**
* The interface Storage service.
Expand Down
Expand Up @@ -14,15 +14,13 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.service.impl;
package io.seata.samples.dubbo.service.impl;

import com.alibaba.fescar.core.context.RootContext;
import com.alibaba.fescar.samples.dubbo.service.AccountService;
import com.alibaba.fescar.samples.dubbo.ApplicationKeeper;
import io.seata.core.context.RootContext;
import io.seata.samples.dubbo.service.AccountService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/**
Expand Down
Expand Up @@ -14,17 +14,16 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.service.impl;
package io.seata.samples.dubbo.service.impl;

import com.alibaba.fescar.core.context.RootContext;
import com.alibaba.fescar.spring.annotation.GlobalTransactional;
import com.alibaba.fescar.samples.dubbo.service.BusinessService;
import com.alibaba.fescar.samples.dubbo.service.OrderService;
import com.alibaba.fescar.samples.dubbo.service.StorageService;
import io.seata.core.context.RootContext;
import io.seata.spring.annotation.GlobalTransactional;
import io.seata.samples.dubbo.service.BusinessService;
import io.seata.samples.dubbo.service.OrderService;
import io.seata.samples.dubbo.service.StorageService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
* Please add the follow VM arguments:
Expand Down
Expand Up @@ -14,21 +14,19 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.service.impl;
package io.seata.samples.dubbo.service.impl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.alibaba.fescar.core.context.RootContext;
import com.alibaba.fescar.samples.dubbo.service.AccountService;
import com.alibaba.fescar.samples.dubbo.ApplicationKeeper;
import com.alibaba.fescar.samples.dubbo.Order;
import com.alibaba.fescar.samples.dubbo.service.OrderService;
import io.seata.core.context.RootContext;
import io.seata.samples.dubbo.service.AccountService;
import io.seata.samples.dubbo.Order;
import io.seata.samples.dubbo.service.OrderService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.PreparedStatementCreator;
import org.springframework.jdbc.support.GeneratedKeyHolder;
Expand Down
Expand Up @@ -14,15 +14,13 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.service.impl;
package io.seata.samples.dubbo.service.impl;

import com.alibaba.fescar.core.context.RootContext;
import com.alibaba.fescar.samples.dubbo.ApplicationKeeper;
import com.alibaba.fescar.samples.dubbo.service.StorageService;
import io.seata.core.context.RootContext;
import io.seata.samples.dubbo.service.StorageService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/**
Expand Down
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.starter;
package io.seata.samples.dubbo.starter;

import com.alibaba.fescar.samples.dubbo.ApplicationKeeper;
import io.seata.samples.dubbo.ApplicationKeeper;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.starter;
package io.seata.samples.dubbo.starter;

import com.alibaba.fescar.samples.dubbo.service.BusinessService;
import io.seata.samples.dubbo.service.BusinessService;

import org.springframework.context.support.ClassPathXmlApplicationContext;

Expand Down
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.starter;
package io.seata.samples.dubbo.starter;

import com.alibaba.fescar.samples.dubbo.ApplicationKeeper;
import io.seata.samples.dubbo.ApplicationKeeper;

import org.springframework.context.support.ClassPathXmlApplicationContext;

Expand Down
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package com.alibaba.fescar.samples.dubbo.starter;
package io.seata.samples.dubbo.starter;

import com.alibaba.fescar.samples.dubbo.ApplicationKeeper;
import io.seata.samples.dubbo.ApplicationKeeper;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down
33 changes: 23 additions & 10 deletions dubbo/src/main/resources/file.conf
Expand Up @@ -20,16 +20,7 @@ transport {
worker-thread-size = 8
}
}
store {
# branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
max-branch-session-size = 16384
# globe session size , if exceeded throws exceptions
max-global-session-size = 512
# file buffer size , if exceeded allocate new buffer
file-write-buffer-cache-size = 16384
# when recover batch read size
session.reload.read_size = 100
}

service {
#vgroup->rgroup
vgroup_mapping.my_test_tx_group = "default"
Expand All @@ -48,3 +39,25 @@ client {
retry.times = 30
}
}


## transaction log store
store {
## store mode: file、db
mode = "file"

## file store
file {
dir = "file_store/dubbo"

# branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
max-branch-session-size = 16384
# globe session size , if exceeded throws exceptions
max-global-session-size = 512
# file buffer size , if exceeded allocate new buffer
file-write-buffer-cache-size = 16384
# when recover batch read size
session.reload.read_size = 100
}
}

8 changes: 4 additions & 4 deletions dubbo/src/main/resources/spring/dubbo-account-service.xml
Expand Up @@ -46,7 +46,7 @@
<property name="filters" value="mergeStat" />
</bean>

<bean id="accountDataSourceProxy" class="com.alibaba.fescar.rm.datasource.DataSourceProxy">
<bean id="accountDataSourceProxy" class="io.seata.rm.datasource.DataSourceProxy">
<constructor-arg ref="accountDataSource" />
</bean>

Expand All @@ -61,13 +61,13 @@
<!--support nacos-->
<!-- <dubbo:registry address="nacos://127.0.0.1:8848"/> -->
<dubbo:protocol name="dubbo" port="20881" />
<dubbo:service interface="com.alibaba.fescar.samples.dubbo.service.AccountService" ref="service" timeout="10000"/>
<dubbo:service interface="io.seata.samples.dubbo.service.AccountService" ref="service" timeout="10000"/>

<bean id="service" class="com.alibaba.fescar.samples.dubbo.service.impl.AccountServiceImpl">
<bean id="service" class="io.seata.samples.dubbo.service.impl.AccountServiceImpl">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
</bean>

<bean class="com.alibaba.fescar.spring.annotation.GlobalTransactionScanner">
<bean class="io.seata.spring.annotation.GlobalTransactionScanner">
<constructor-arg value="dubbo-demo-account-service"/>
<constructor-arg value="my_test_tx_group"/>
</bean>
Expand Down
8 changes: 4 additions & 4 deletions dubbo/src/main/resources/spring/dubbo-business.xml
Expand Up @@ -28,15 +28,15 @@
<!--support nacos-->
<!-- <dubbo:registry address="nacos://127.0.0.1:8848"/> -->

<dubbo:reference id="orderService" check="false" interface="com.alibaba.fescar.samples.dubbo.service.OrderService"/>
<dubbo:reference id="storageService" check="false" interface="com.alibaba.fescar.samples.dubbo.service.StorageService"/>
<dubbo:reference id="orderService" check="false" interface="io.seata.samples.dubbo.service.OrderService"/>
<dubbo:reference id="storageService" check="false" interface="io.seata.samples.dubbo.service.StorageService"/>

<bean id="business" class="com.alibaba.fescar.samples.dubbo.service.impl.BusinessServiceImpl">
<bean id="business" class="io.seata.samples.dubbo.service.impl.BusinessServiceImpl">
<property name="orderService" ref="orderService"/>
<property name="storageService" ref="storageService"/>
</bean>

<bean class="com.alibaba.fescar.spring.annotation.GlobalTransactionScanner">
<bean class="io.seata.spring.annotation.GlobalTransactionScanner">
<constructor-arg value="dubbo-demo-app"/>
<constructor-arg value="my_test_tx_group"/>
</bean>
Expand Down
10 changes: 5 additions & 5 deletions dubbo/src/main/resources/spring/dubbo-order-service.xml
Expand Up @@ -46,7 +46,7 @@
<property name="filters" value="mergeStat"/>
</bean>

<bean id="orderDataSourceProxy" class="com.alibaba.fescar.rm.datasource.DataSourceProxy">
<bean id="orderDataSourceProxy" class="io.seata.rm.datasource.DataSourceProxy">
<constructor-arg ref="orderDataSource"/>
</bean>

Expand All @@ -61,16 +61,16 @@
<!--support nacos-->
<!-- <dubbo:registry address="nacos://127.0.0.1:8848"/> -->
<dubbo:protocol name="dubbo" port="20883"/>
<dubbo:service interface="com.alibaba.fescar.samples.dubbo.service.OrderService" ref="service" timeout="10000"/>
<dubbo:service interface="io.seata.samples.dubbo.service.OrderService" ref="service" timeout="10000"/>

<dubbo:reference id="accountService" check="false" interface="com.alibaba.fescar.samples.dubbo.service.AccountService"/>
<dubbo:reference id="accountService" check="false" interface="io.seata.samples.dubbo.service.AccountService"/>

<bean id="service" class="com.alibaba.fescar.samples.dubbo.service.impl.OrderServiceImpl">
<bean id="service" class="io.seata.samples.dubbo.service.impl.OrderServiceImpl">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
<property name="accountService" ref="accountService"/>
</bean>

<bean class="com.alibaba.fescar.spring.annotation.GlobalTransactionScanner">
<bean class="io.seata.spring.annotation.GlobalTransactionScanner">
<constructor-arg value="dubbo-demo-order-service"/>
<constructor-arg value="my_test_tx_group"/>
</bean>
Expand Down
8 changes: 4 additions & 4 deletions dubbo/src/main/resources/spring/dubbo-storage-service.xml
Expand Up @@ -46,7 +46,7 @@
<property name="filters" value="mergeStat" />
</bean>

<bean id="storageDataSourceProxy" class="com.alibaba.fescar.rm.datasource.DataSourceProxy">
<bean id="storageDataSourceProxy" class="io.seata.rm.datasource.DataSourceProxy">
<constructor-arg ref="storageDataSource" />
</bean>

Expand All @@ -61,13 +61,13 @@
<!--support nacos-->
<!-- <dubbo:registry address="nacos://127.0.0.1:8848"/> -->
<dubbo:protocol name="dubbo" port="20882" />
<dubbo:service interface="com.alibaba.fescar.samples.dubbo.service.StorageService" ref="service" timeout="10000"/>
<dubbo:service interface="io.seata.samples.dubbo.service.StorageService" ref="service" timeout="10000"/>

<bean id="service" class="com.alibaba.fescar.samples.dubbo.service.impl.StorageServiceImpl">
<bean id="service" class="io.seata.samples.dubbo.service.impl.StorageServiceImpl">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
</bean>

<bean class="com.alibaba.fescar.spring.annotation.GlobalTransactionScanner">
<bean class="io.seata.spring.annotation.GlobalTransactionScanner">
<constructor-arg value="dubbo-demo-storage-service"/>
<constructor-arg value="my_test_tx_group"/>
</bean>
Expand Down

0 comments on commit f9e99a7

Please sign in to comment.