V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zxc1234
V2EX  ›  程序员

问个事务相关

  •  
  •   zxc1234 · 2020-04-04 12:17:14 +08:00 · 1319 次点击
    这是一个创建于 1480 天前的主题,其中的信息可能已经有所发展或是发生改变。

    有两个方法,a 方法,b 方法

    如果 a 方法调用注解了事务的 b 方法,那么事务还会生效吗

    为什么呢

    3 条回复    2020-04-04 21:29:47 +08:00
    hantsy
        1
    hantsy  
       2020-04-04 12:56:07 +08:00
    怎么处理,取决于 Transacational 的 propagation 属性( Spring )或者 TxType ( CDI,Jakarta EE )。
    仔细阅读,https://docs.spring.io/spring/docs/5.2.x/spring-framework-reference/data-access.html#transaction
    kosmosr
        2
    kosmosr  
       2020-04-04 13:17:08 +08:00
    google 事务传播机制
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5889 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 02:01 · PVG 10:01 · LAX 19:01 · JFK 22:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.