java - service中开启线程的事务问题
PHPz
PHPz 2017-04-18 09:56:07
0
2
468

现在的情况是在AService(spring创建)中 开启了一个线程,该线程通过线程池(spring创建)执行execute,线程中执行了BService(spring创建)的逻辑 事务都配成required,方法知道下来会在一个事务里么?

PHPz
PHPz

学习是最好的投资!

reply all(2)
阿神

PROPAGATION_REQUIRED
If there is no current transaction, create a new transaction. If there is already a transaction, add it to this transaction.

Ty80

I remember that Spring’s transactions are implemented through ThreadLocal, so AService and BService will not be in the same transaction

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template