当前位置:网站首页>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 .
边栏推荐
猜你喜欢
How to check the ram and ROM usage of MCU through Keil
2022-7-6 Leetcode27. Remove the element - I haven't done the problem for a long time. It's such an embarrassing day for double pointers
DID登陆-MetaMask
10 pictures open the door of CPU cache consistency
2022-7-6 Leetcode27.移除元素——太久没有做题了,为双指针如此狼狈的一天
.net core 关于redis的pipeline以及事务
Getting started with cinnamon applet
SSRF vulnerability file pseudo protocol [netding Cup 2018] fakebook1
Battle Atlas: 12 scenarios detailing the requirements for container safety construction
Take you to master the three-tier architecture (recommended Collection)
随机推荐
2022-7-6 beginner redis (I) download, install and run redis under Linux
Realization of search box effect [daily question]
Help tenants
10 pictures open the door of CPU cache consistency
648. 单词替换 : 字典树的经典运用
2022-7-6 Leetcode 977. Square of ordered array
3D detection: fast visualization of 3D box and point cloud
Enregistrement de la navigation et de la mise en service du robot ROS intérieur (expérience de sélection du rayon de dilatation)
搜索框效果的实现【每日一题】
属性关键字Aliases,Calculated,Cardinality,ClientName
高等數學---第八章多元函數微分學1
Is the compass stock software reliable? Is it safe to trade stocks?
The reason why data truncated for column 'xxx' at row 1 appears in the MySQL import file
供应链供需预估-[时间序列]
Laravel5 call to undefined function openssl cipher iv length() 报错 PHP7开启OpenSSL扩展失败
Navicat运行sql文件导入数据不全或导入失败
What parameters need to be reconfigured to replace the new radar of ROS robot
使用day.js让时间 (显示为几分钟前 几小时前 几天前 几个月前 )
Huawei image address
The meaning of variables starting with underscores in PHP