Skip to content

Commit

Permalink
Merge pull request #89 from QNJR-GROUP/1.x
Browse files Browse the repository at this point in the history
bugfix: consistant gaurdian not init
  • Loading branch information
skyesx authored Nov 22, 2018
2 parents 758432f + 903c35f commit 84d951c
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ConsistentGuardianDaemonConfiguration {
private String applicationName;

@Bean
@ConditionalOnProperty("easytrans.recovery.enabled")
@ConditionalOnProperty(name="easytrans.recovery.enabled",matchIfMissing = true)
public ConsistentGuardianDaemon consistentGuardianDaemon(ConsistentGuardianDaemonProperties properties,TransactionLogReader logReader, ConsistentGuardian guardian,
EasyTransMasterSelector master){
return new ConsistentGuardianDaemon(logReader, guardian, master, properties.getExecuteInterval(), properties.getPageSize(), properties.getDelay());
Expand Down
2 changes: 1 addition & 1 deletion easytrans-demo/interface-call/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<revision>1.1.1</revision>
<revision>1.1.2</revision>
</properties>


Expand Down
2 changes: 1 addition & 1 deletion easytrans-demo/rpc-dubbo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<revision>1.1.1</revision>
<revision>1.1.2</revision>
</properties>


Expand Down
2 changes: 1 addition & 1 deletion easytrans-demo/sagatcc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<revision>1.1.1</revision>
<revision>1.1.2</revision>
</properties>


Expand Down
2 changes: 1 addition & 1 deletion easytrans-demo/tcc-and-msg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<revision>1.1.1</revision>
<revision>1.1.2</revision>
</properties>


Expand Down
2 changes: 1 addition & 1 deletion easytrans-demo/tcc-only/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<revision>1.1.1</revision>
<revision>1.1.2</revision>
</properties>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Lazy;
import org.springframework.transaction.PlatformTransactionManager;

Expand Down Expand Up @@ -329,9 +330,8 @@ public static class EnableDefaultRpcImpl {
public static class EnableDefaultMasterImpl {
}

@Bean
public ConsistentGuardianDaemonConfiguration consistentGuardianDaemonConfiguration() {
return new ConsistentGuardianDaemonConfiguration();
@Import(ConsistentGuardianDaemonConfiguration.class)
public static class EnableConsistentGuardianDaemon {
}

@Bean
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<revision>1.1.1</revision>
<revision>1.1.2</revision>
</properties>


Expand Down
2 changes: 1 addition & 1 deletion readme-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Business code can introduce EasyTransaction by maven
<dependency>
<groupId>com.yiqiniu.easytrans</groupId>
<artifactId>easytrans-starter</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>
</dependency>

This Starter contains several default implement, included: RDBS based distributed transaction log,Netflix-ribbon based http RPC implement,KAFKA based queue,if you want to replace it ,just exclude it.
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
* 本框架实现的SAGA并非传统的SAGA,可以将其类比为异步TCC,与传统SAGA的区别可以类比 传统补偿及TCC的关系
* 还有就是本框架使用RPC而非队列实现SAGA,具体原因可以在SAGA-TCC这个DEMO里查看

关于如何选择分布式事务形态,更详细的可参考:https://mp.weixin.qq.com/s/Vwh4RuwEocsMpOFyvmFJfw

### 框架对应实现及基本原理
框架实现了上述所有事务场景的解决方案,并提供了统一易用的接口。以下介绍基本实现原理

Expand Down Expand Up @@ -90,7 +92,7 @@
<dependency>
<groupId>com.yiqiniu.easytrans</groupId>
<artifactId>easytrans-starter</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>
</dependency>

Starter里包含了若干默认的组件实现:基于mysql的分布式事务日志存储,基于ribbon-rest的RPC实现,基于KAFKA的消息队列,若不需要或者要替换,可以EXCLUDE掉
Expand Down

0 comments on commit 84d951c

Please sign in to comment.