当前位置:网站首页>Seven propagation behaviors of transactions
Seven propagation behaviors of transactions
2022-07-07 13:59:00 【Study notes of Aries orange】
One 、 What is the communication behavior of affairs
The propagation behavior of a transaction refers to : When a transaction method is called by another transaction method , How should this transaction method work .
for example :methodA Method call methodB When the method is used ,methodB Is to continue to call A Running in the same transaction , Or start a new transaction for yourself . That's why methodB The business communication behavior determines .
Two 、 Seven communication behaviors of affairs
1、PROPAGATION_REQUIRED: If there is no current transaction , Just create a new transaction ; If there are currently transactions , Just join the change business ( This is the most common choice )
2、PROPAGATION_SUPPORTS: If there are currently transactions , Just join the transaction ; If there is no current transaction , It's non transactional
3、PROPAGATION_MANDATORY: If there are currently transactions , Just join the transaction ; If there is no current transaction , Throw an exception
4、PROPAGATION_REQUIRES_NEW: No matter whether there is a transaction or not , Both create new transactions
5、PROPAGATION_NOT_SUPPORTED: Perform operations in a non transactional way , If there are currently transactions , Suspend the current transaction
6、PROPAGATION_NEVER: To execute in a non transactional manner , If there are currently transactions , Throw an exception
7、PROPAGATION_NESTED:
3、 ... and 、 Understanding of the above concepts
1、 Transaction pending
for example Method A Support transactions , Method B Unsupported transaction , Method A Calling method B
In the method A Start running , The system establishes Transaction, Method A Database processing operations in , It's time to Transaction Under the control of . At this time , Method A Calling method B, Method A The open Transaction Will be suspended , Method B Any database operation in , Not at all Transaction Under the management of . When method B return , Method A Continue operation , Previous Transaction reply , The following database operations continue in this Transaction Under the control of Commit or rollback .
边栏推荐
- Details of redis core data structure & new features of redis 6
- Laravel form builder uses
- SSRF漏洞file伪协议之[网鼎杯 2018]Fakebook1
- Did login metamask
- JS function returns multiple values
- Beginner XML
- Laravel5 call to undefined function openssl cipher iv length() 报错 PHP7开启OpenSSL扩展失败
- Problems that cannot be accessed in MySQL LAN
- Talk about pseudo sharing
- Flink | 多流转换
猜你喜欢
Build a secure and trusted computing platform based on Kunpeng's native security
Navicat运行sql文件导入数据不全或导入失败
Centso7 OpenSSL error Verify return code: 20 (unable to get local issuer certificate)
flask session伪造之hctf admin
Detr introduction
Mathématiques avancées - - chapitre 8 différenciation des fonctions multivariables 1
2022-7-7 Leetcode 844.比较含退格的字符串
Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
Ways to improve the performance of raspberry pie
Leetcode simple question sharing (20)
随机推荐
Split screen bug notes
Move base parameter analysis and experience summary
FCOS3D label assignment
Ways to improve the performance of raspberry pie
THINKPHP框架的优秀开源系统推荐
Laravel form builder uses
Ogre introduction
Huawei image address
2022-7-6 Leetcode 977. Square of ordered array
手把手教会:XML建模
Take you to master the three-tier architecture (recommended Collection)
Excellent open source system recommendation of ThinkPHP framework
.net core 关于redis的pipeline以及事务
How can the PC page call QQ for online chat?
Problems that cannot be accessed in MySQL LAN
3D Detection: 3D Box和点云 快速可视化
ES日志报错赏析-Limit of total fields
Laravel5 call to undefined function openssl cipher iv length() 报错 PHP7开启OpenSSL扩展失败
Flask session forged hctf admin
Cinnamon taskbar speed