Giter Site home page Giter Site logo

tx-lcn's Introduction

LCN分布式事务框架

框架特点

  1. 支持各种基于spring的db框架
  2. 兼容springcloud、dubbo
  3. 使用简单,代码完全开源
  4. 基于切面的强一致性事务框架
  5. 高可用,模块可以依赖dubbo或springcloud的集群方式做集群化,TxManager也可以做集群化

使用示例

分布式事务发起方:

    @Override
    @TxTransaction
    public boolean hello() {
        //本地调用
        testDao.save();
        //远程调用方
        boolean res =  test2Service.test();
        //模拟异常
        int v = 100/0;
        return true;
    }
    

分布式事务被调用方(test2Service的业务实现类)

    @Override
    public boolean test() {
        //本地调用
        testDao.save();
        return true;
    }

如上代码执行完成以后两个模块都将回滚事务。

说明:只需要在分布式事务的开启方添加@TxTransaction注解即可。详细见demo教程

目录说明

lorne-tx-core 是LCN分布式事务框架的切面核心类库

dubbo-transaction 是LCN dubbo分布式事务框架

springcloud-transaction 是LCN springcloud分布式事务框架

tx-manager 是LCN 分布式事务协调器(TxManager)

关于框架的设计原理

TxManager

demo 说明

demo里包含jdbc\hibernate\mybatis版本的demo

dubbo版本的demo dubbo-demo

springcloud版本的demo springcloud-demo

技术交流群:554855843

tx-lcn's People

Contributors

xlorne avatar

Stargazers

Yumeng0628 avatar thinkgem avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.