阿里分布式事务fescar源码本地测试

本地测试

编译源码

  • mvn compile
  • mvn install

启动服务

  • 源码启动方式
    1
    2
    cd cd server
    mvn exec:java -Dexec.mainClass="com.alibaba.fescar.server.Server" -Dexec.args="8091 /Users/m65536/Downloads/fescar-server-0.1.0/data"
    
  • release包启动方式
    1
    sh fescar-server.sh 8091 /Users/m65536/Downloads/fescar-server-0.1.0/data
    

启动example

  • 首先修改数据库配置保证可以正常连接

  • AccountServiceImpl
    1
    2
    cd examples
    mvn exec:java -Dexec.mainClass="com.alibaba.fescar.tm.dubbo.impl.AccountServiceImpl" -Djava.net.preferIPv4Stack=true
    
  • StorageServiceImpl
    1
    2
    cd examples
    mvn exec:java -Dexec.mainClass="com.alibaba.fescar.tm.dubbo.impl.StorageServiceImpl" -Djava.net.preferIPv4Stack=true
    
  • OrderServiceImpl
    1
    2
    cd examples
    mvn exec:java -Dexec.mainClass="com.alibaba.fescar.tm.dubbo.impl.OrderServiceImpl" -Djava.net.preferIPv4Stack=true
    
  • BusinessServiceImpl调用测试
    1
    2
    cd examples
    mvn exec:java -Dexec.mainClass="com.alibaba.fescar.tm.dubbo.impl.BusinessServiceImpl" -Djava.net.preferIPv4Stack=true