I'm working on refactoring a module with an initial method annotated with @Transactional(propagation = Propagation.NOT_SUPPORTED)
and this method invokes another method that has the annotation @Transactional(propagation = Propagation.REQUIRES_NEW)
.
My question is, since the initial method is not creating a new transaction, the invoked method will create a new transaction?
Yes, the invoked method will create and run in a new transaction.
REQUIRES_NEW will always create a new transaction irrespective of transactional mode of caller method (even if caller already created a transaction).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.