当前位置:网站首页>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 .
边栏推荐
- Help tenants
- Centso7 OpenSSL error Verify return code: 20 (unable to get local issuer certificate)
- 2022-7-7 Leetcode 844.比较含退格的字符串
- What parameters need to be reconfigured to replace the new radar of ROS robot
- xshell连接服务器把密钥登陆改为密码登陆
- 2022-7-6 Leetcode 977.有序数组的平方
- 2022-7-6 sigurg is used to receive external data. I don't know why it can't be printed out
- Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
- Realize the IP address home display function and number home query
- 【日常训练--腾讯精选50】231. 2 的幂
猜你喜欢
10 pictures open the door of CPU cache consistency
2022-7-6 初学redis(一)在 Linux 下下载安装并运行 redis
MySQL error 28 and solution
Deep understanding of array related problems in C language
Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
社会责任·价值共创,中关村网络安全与信息化产业联盟对话网信企业家海泰方圆董事长姜海舟先生
Vmware 与主机之间传输文件
DID登陆-MetaMask
Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
SSRF漏洞file伪协议之[网鼎杯 2018]Fakebook1
随机推荐
Help tenants
Excerpt from "misogyny: female disgust in Japan"
Parameter keywords final, flags, internal, mapping keywords internal
[1] Basic knowledge of ros2 - summary version of operation commands
10 pictures open the door of CPU cache consistency
PC端页面如何调用QQ进行在线聊天?
高等数学---第八章多元函数微分学1
How to check the ram and ROM usage of MCU through Keil
Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
2022-7-7 Leetcode 844.比较含退格的字符串
Error lnk2019: unresolved external symbol
Interface automation test - solution of data dependency between interfaces
Dry goods | summarize the linkage use of those vulnerability tools
Custom thread pool rejection policy
. Net core about redis pipeline and transactions
Laravel Form-builder使用
ES日志报错赏析-Limit of total fields
Vmware共享主机的有线网络IP地址
手里的闲钱是炒股票还是买理财产品好?
Es log error appreciation -limit of total fields