CN116302845A - Method and device for determining transaction operation mode, electronic equipment and storage medium - Google Patents
Method and device for determining transaction operation mode, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116302845A CN116302845A CN202310552482.0A CN202310552482A CN116302845A CN 116302845 A CN116302845 A CN 116302845A CN 202310552482 A CN202310552482 A CN 202310552482A CN 116302845 A CN116302845 A CN 116302845A
- Authority
- CN
- China
- Prior art keywords
- transaction
- attribute value
- database
- connection attribute
- connection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 107
- 238000012545 processing Methods 0.000 claims abstract description 14
- 238000001514 detection method Methods 0.000 claims description 47
- 230000015654 memory Effects 0.000 claims description 11
- 230000008569 process Effects 0.000 claims description 9
- 238000013507 mapping Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 description 19
- 230000005540 biological transmission Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000007547 defect Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000011161 development Methods 0.000 description 5
- 238000012546 transfer Methods 0.000 description 5
- 238000002955 isolation Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 239000003607 modifier Substances 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000002688 persistence Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 239000002253 acid Substances 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 230000001010 compromised effect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000005096 rolling process Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method and a device for determining a transaction running mode, electronic equipment and a storage medium, and can be applied to the technical field of computers. The method for determining the transaction operation mode comprises the following steps: setting the propagation attribute value of the transaction to be a first preset value; acquiring a connection attribute value of a database corresponding to the transaction, wherein the connection attribute value characterizes an operation mode adopted by the transaction when processing data in the database, and is configured according to the propagation attribute value; and determining the operation mode of the transaction according to the connection attribute value under the condition that the connection attribute value is equal to the second preset value.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for determining a transaction running mode, an electronic device, a storage medium, and a program product.
Background
In utilizing data in a transactional database, some application scenarios need to ensure that a transaction runs in a non-transactional manner, and the method corresponding to the transaction may be packaged in a separate development component.
In the related art, it is generally ensured that a transaction is operated in a non-transactional manner by expanding code related to a transaction management framework, detecting whether the transaction is operated in the non-transactional manner, the method is difficult to implement, there is a risk of generating new defect problems, and after the transaction management framework is maintained in a subsequent upgrade, the expanded code related to the transaction management framework has a compatibility risk with the upgraded transaction management framework.
Disclosure of Invention
In view of the foregoing, the present invention provides a method, apparatus, electronic device, storage medium, and program product for determining a transaction running mode.
According to a first aspect of the present invention, there is provided a method for determining a transaction running mode, including:
setting the propagation attribute value of the transaction as a first preset value;
acquiring a connection attribute value of a database corresponding to the transaction, wherein the connection attribute value characterizes an operation mode adopted by the transaction when processing data in the database, and the connection attribute value is configured according to the propagation attribute value; and
and determining the operation mode of the transaction according to the connection attribute value under the condition that the connection attribute value is equal to a second preset value.
According to an embodiment of the present invention, before the obtaining the connection attribute value of the database corresponding to the transaction, the method includes:
and configuring the connection attribute value according to the propagation attribute value.
According to an embodiment of the present invention, the obtaining the connection attribute value of the database corresponding to the transaction includes:
acquiring a session object related to the transaction, wherein the session object comprises a database connection object, and the database connection object comprises a method for operating the database; acquiring the database connection object according to the session object;
and obtaining the connection attribute value according to the database connection object.
According to an embodiment of the present invention, the connection attribute value includes an auto-commit attribute value.
According to an embodiment of the present invention, the method further includes:
detecting a call link related to the transaction under the condition that the connection attribute value is not equal to the second preset value, so as to obtain a first detection result;
and reconfiguring the connection attribute value according to the first detection result.
According to an embodiment of the present invention, the first detection result includes a second detection result and a third detection result, and detecting the call link related to the transaction to obtain the first detection result includes:
Respectively detecting the propagation attribute values of all the transactions on the call link to obtain the second detection result;
and respectively detecting the output results of the transactions on the calling link to obtain the third detection result.
According to an embodiment of the present invention, the transaction processes data in a database corresponding to the transaction based on an object relationship mapping framework.
A second aspect of the present invention provides a determining apparatus for a transaction running mode, including:
the setting module is used for setting the propagation attribute value of the transaction as a first preset value;
the acquisition module is used for acquiring a connection attribute value of the database corresponding to the transaction, wherein the connection attribute value represents an operation mode adopted by the transaction when processing data in the database, and the connection attribute value is configured according to the propagation attribute value; and
and the determining module is used for determining the operation mode of the transaction according to the connection attribute value under the condition that the connection attribute value is equal to a second preset value.
A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method described above.
A fourth aspect of the invention also provides a computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the above method.
The fifth aspect of the invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the method, the device, the electronic equipment, the storage medium and the computer program product for determining the transaction operation mode, the propagation attribute value of the transaction is set to be a first preset value; acquiring a connection attribute value of a database corresponding to the transaction, wherein the connection attribute value represents an operation mode adopted by the transaction when processing data in the database, and the connection attribute value is configured according to the propagation attribute value; and under the condition that the connection attribute value is equal to the second preset value, determining the operation mode of the transaction according to the connection attribute value, and indirectly determining whether the transaction is operated in a non-transaction mode by determining whether the connection attribute value of a database corresponding to the transaction is equal to the second preset value, thereby ensuring the accuracy of determining the operation mode of the transaction, avoiding the need of adding and expanding codes related to a transaction management framework and avoiding the generation of new defect problems and compatibility problems.
Drawings
The foregoing and other objects, features and advantages of the invention will be apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
FIG. 1 illustrates an application scenario diagram of a method of determining a transaction run mode according to an embodiment of the present invention;
FIG. 2 illustrates a flow chart of a method of determining a transaction run mode according to an embodiment of the invention;
FIG. 3 illustrates a flow chart of another method of determining a transaction run mode according to an embodiment of the invention;
FIG. 4 shows a block diagram of a determination device of a transaction run mode according to an embodiment of the present invention; and
fig. 5 shows a block diagram of an electronic device adapted to implement a method of determining a transaction run mode according to an embodiment of the invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the invention, the related data (such as including but not limited to personal information of a user) are collected, stored, used, processed, transmitted, provided, disclosed, applied and the like, all meet the requirements of related laws and regulations, necessary security measures are adopted, and the public welcome is not violated.
According to an embodiment of the invention, a Transaction (Transaction) characterizes a program execution unit (unit) that accesses and updates various data items in a database.
According to an embodiment of the invention, a transaction is the basic unit of recovering and concurrency controlling various data items in a database.
According to an embodiment of the invention, a transaction may have 4 attributes: atomicity (atom), consistency (consistency), isolation (isolation), durability (durability). The four attributes are commonly referred to as ACID characteristics.
According to an embodiment of the invention, an atomicity characterizes a transaction as an indivisible unit of work, and operations included in the transaction are either all done or none done, without ending in some intermediate link. If a transaction makes an error during execution, the modification of the data in the database by the transaction is restored to the state before the transaction began, as if the transaction had never been executed.
According to embodiments of the present invention, the integrity of the database is not compromised before and after execution of the transaction. I.e., the transaction changes the database from one coherency state to another. The consistency of the transaction has close association with atomicity.
According to an embodiment of the invention, isolation characterization is that in the case that multiple concurrent transactions read, write and modify their data simultaneously, execution of one of the multiple concurrent transactions cannot be interfered by other transactions. The isolation of the transactions can prevent data inconsistency in the database caused by cross execution of a plurality of transactions when the plurality of transactions are executed concurrently.
According to embodiments of the invention, persistence is also referred to as permanence (permanence). After the persistence characterizing transaction is committed, the transaction's modification to the data in the database is permanent and will not be lost even if the system fails.
According to embodiments of the present invention, in some scenarios, it is ensured that transactions run in a non-transactional manner.
According to an embodiment of the invention, for example: in the case of the transfer of the user A to the user B, the transaction C can realize the transfer operation of the user A to the user B, and the transaction C is operated in a transaction mode so as to ensure that all the transfer operations of the user A to the user B succeed or fail together, and ensure the consistency of the operations of data respectively related to the user A and the user B. After the transaction C is completed, the transaction C calls the transaction D to generate the order number related to the transfer of the user A to the user B, and at the moment, the transaction D needs to run in a non-transaction mode to ensure that the transaction D is not influenced by the transaction C, namely whether the transaction D is successful or not, the transaction D can generate the order number related to the transfer of the user A to the user B, so that the operation of transferring the user A to the user B can be queried according to the order number generated by the transaction D.
In the related art, whether the transaction operates in a non-transaction mode is generally ensured by expanding codes related to the transaction management framework or not and detecting whether the transaction operates in the non-transaction mode.
In order to at least partially solve the technical problems in the related art, the invention provides a method and a device for determining a transaction running mode, electronic equipment and a storage medium, which can be applied to the technical field of computers. The method for determining the transaction operation mode comprises the following steps: setting the propagation attribute value of the transaction to be a first preset value; acquiring a connection attribute value of a database corresponding to the transaction, wherein the connection attribute value characterizes an operation mode adopted by the transaction when processing data in the database, and is configured according to the propagation attribute value; and determining the operation mode of the transaction according to the connection attribute value under the condition that the connection attribute value is equal to the second preset value.
Fig. 1 shows an application scenario diagram of a method for determining a transaction running mode according to an embodiment of the present invention.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the method for determining the transaction operation mode provided by the embodiment of the present invention may be generally performed by the server 105. Accordingly, the determining device for the transaction running mode provided in the embodiment of the present invention may be generally set in the server 105. The method for determining the transaction operation mode provided by the embodiment of the present invention may also be performed by a server or a server cluster which is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105. Accordingly, the determining device of the transaction operation manner provided in the embodiment of the present invention may be set in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The method for determining the transaction operation mode according to the embodiment of the present invention will be described in detail below based on the scenario described in fig. 1 through fig. 2 to 3.
FIG. 2 illustrates a flow chart of a method of determining a transaction run mode according to an embodiment of the invention.
As shown in FIG. 2, the method for determining the transaction operation mode in this embodiment includes operations S210-S230.
In operation S210, a propagation attribute value of a transaction is set to a first preset value.
According to an embodiment of the present invention, the transaction operation modes include a transaction operation mode and a non-transaction operation mode. In the case that the transaction is in the transaction running mode, the multiple program statements included in the transaction are executed successfully together and fail to be executed together. Under the condition that the transaction is in a non-transaction running mode, a plurality of program sentences included in the transaction are not influenced by the execution results.
According to an embodiment of the invention, a propagation attribute corresponding to a propagation attribute value characterizes the propagation behavior when one transaction is nested into another already existing transaction. Thus, after determining the propagation attribute value of a transaction, the propagation behavior of the transaction when nested into another already existing transaction can be determined.
According to an embodiment of the invention, the propagation attribute value of a transaction reflects the way the transaction is running.
According to an embodiment of the invention, for example, there is already a running transaction E, in which case transaction F may be added to transaction E or run alone, depending on the propagation attribute value associated with transaction F.
According to the embodiment of the invention, in the case that the transaction F is added to the transaction E according to the propagation attribute value related to the transaction F, the transaction E and the transaction F as a whole process data in the database, and the transaction E and the transaction F succeed or fail together in operating the data in the database, and the operation mode of the transaction F is a transaction operation mode.
According to the embodiment of the invention, in the case that the transaction F is independently operated according to the propagation attribute value related to the transaction F, the execution results between the transaction E and the transaction F are not influenced, and at this time, the operation mode of the transaction F is a non-transaction operation mode.
According to the embodiment of the invention, the Spring framework is an open-source development platform based on an object-oriented programming language (Java), various types of development tools are integrated into the Spring framework, and durable Java application programs can be quickly developed through the Spring framework.
According to the embodiment of the invention, the propagation attribute value (propagation) of the transaction corresponding to the interface method or the interface class can be set to a first preset value based on the Spring framework in a mode of configuring @ transaction annotation for the interface method or the interface class, and then the operations of opening, submitting or rolling back the transaction and the like according to the @ transaction annotation are managed based on the Spring framework. Wherein @ TransactionAnnotation characterizes annotations used in declarative transaction management programming.
According to the embodiment of the invention, under the spring framework, the propagation attribute value generation of the transaction has seven forms, namely: REQUIRED, SUPPORTS, MANDATORY, REQUIRES _NEW, NOT_ SUPPORTED, NEVER and NESTED.
According to an embodiment of the present invention, for example, a @ transaction (transmission=transmission.required) comment may be configured for an interface method or an interface class based on a spring framework, and a transaction propagation attribute value transmission of a transaction corresponding to the interface method or the interface class may be set to REQUIRED. At this time, before the spring framework starts the transaction, if no other transaction is started, a new transaction is started, so that the transaction operates in a transaction mode. If the transaction is started before other transactions are started, the transaction is added to the other transactions, and the transaction is operated in a transaction mode.
According to an embodiment of the present invention, for example, a @ transaction (transmission=transmission. Not_supported) comment may also be configured for an interface method or an interface class based on a spring framework, and a propagation attribute value transmission of a transaction corresponding to the interface method or the interface class may be set to not_supported. At this time, the spring framework suspends other transactions before starting the transaction, and restarts a new transaction for the transaction if the other transactions have already been started, so that the transaction operates in a non-transactional manner.
According to the embodiment of the invention, the operation mode of the transaction can be simply and quickly managed according to the propagation attribute value based on the spring frame by setting the propagation attribute value of the transaction to the first preset value based on the spring frame.
In operation S220, a connection attribute value of a database corresponding to the transaction is obtained, where the connection attribute value characterizes an operation mode adopted by the transaction when processing data in the database, and the connection attribute value is configured according to the propagation attribute value.
According to the embodiment of the invention, since the engineering environment, configuration, etc. of the independent development component related to the interface method or the interface class affect the operation mode of the transaction corresponding to the interface method or the interface method, even if the interface method or the interface class in the independent development component is configured with the @ transaction=provision. Not_supported annotation, the transaction corresponding to the interface method or the interface class may not be finally operated in a non-transaction mode, that is, the @ transaction annotation is not effective, therefore, the operation mode of the transaction needs to be further detected, and the operation mode of the transaction needs to be further determined.
According to the embodiment of the invention, after the @ transaction annotation is configured for the interface method or the interface class based on the spring framework, before the transaction corresponding to the interface method or the interface class is executed, the spring framework configures the connection attribute value of the database corresponding to the transaction according to the @ transaction annotation, so that the running mode of the transaction can be further determined by detecting the connection attribute value of the database related to the transaction.
According to an embodiment of the invention, the object-relationship-based mapping framework MyBatis is a data persistence layer framework that supports custom SQL, storage procedures, and advanced mapping. MyBatis avoids almost all JDBC code, manual setting of parameters, and the effort to get a result set. MyBatis can use simple XML or annotations to configure and map the original type, interface, and Java entity class (Plain Ordinary Java Object, POJOs, plain Java object) to records in the database.
According to embodiments of the invention, data in an operation database related to transactions may be operated on using a spring-based MyBatis framework.
According to the embodiment of the invention, the connection attribute value of the database stored at the database end can be obtained by using the spring-based MyBatis framework, and then the running mode of the transaction can be further determined according to the connection attribute value.
In operation S230, in case the connection attribute value is equal to the second preset value, the operation mode of the transaction is determined according to the connection attribute value.
According to an embodiment of the present invention, the connection attribute value may include, for example, both true and false forms. In the case where the connection attribute value is true, the transaction may run in a non-transactional manner. In the case where the connection attribute value is false, the transaction may run in a transactional manner. And under the condition that the second preset value is true and the connection attribute value is detected to be equal to true, determining that the transaction runs in a non-transaction mode. In the case where the second preset value is false, and it is detected that the connection attribute value is equal to false, it may be determined that the transaction is running in a transactional manner.
According to the embodiment of the invention, the method for determining the transaction operation mode can indirectly determine whether the transaction is operated in a non-transaction mode by determining whether the connection attribute value of the database corresponding to the transaction is equal to the second preset value, thereby ensuring the accuracy of determining the operation mode of the transaction, and avoiding the generation of new defect problems and compatibility problems without increasing and expanding codes related to a transaction management framework.
According to an embodiment of the present invention, before acquiring a connection attribute value of a database corresponding to a transaction, the method includes:
the connection attribute values are configured according to the propagation attribute values.
According to the embodiment of the invention, the spring framework can be utilized to configure the connection attribute value of the database related to the transaction according to the propagation attribute value set by the @ transaction annotation, the connection attribute value is sent to the server side of the database related to the transaction, and the server side stores the connection attribute value.
According to the embodiment of the invention, the spring framework is utilized to configure the connection attribute value of the database related to the transaction according to the propagation attribute value set by the @ transaction annotation, so that the efficiency of configuring the connection attribute value according to the propagation attribute value is improved.
According to the embodiment of the invention, under the condition that the @ transitional annotation related to the propagation attribute value is effective under the spring framework, the connection attribute value is configured according to the propagation attribute value, so that the operation modes of the transaction reflected according to the propagation attribute value and the connection attribute value can be ensured to be the same, and the operation modes of the transaction can be accurately determined according to the connection attribute value.
According to the embodiment of the invention, under the condition that @ transitional annotation related to the propagation attribute value is not effective under the spring framework, the connection attribute value is configured according to the propagation attribute value, the operation modes of the transaction reflected according to the propagation attribute value and the connection attribute value are different, and further, the operation modes of the transaction can be accurately determined to be incorrect according to the connection attribute value.
According to an embodiment of the present invention, for operation S220, obtaining the connection attribute value of the database corresponding to the transaction may further include the following operations:
acquiring a session object related to a transaction, wherein the session object comprises a database connection object, and the database connection object comprises a method for operating a database; acquiring a database connection object according to the session object;
and obtaining a connection attribute value according to the database connection object.
According to the embodiment of the invention, a session object related to the transaction can be acquired by using a spring-based MyBatis framework, and then the object is connected according to a database to obtain a connection attribute value.
According to the embodiment of the invention, the connection attribute value can be obtained according to the code sqlSessionFacto.openSession (). GetConnection (). GetAutoCommit () based on the spring MyBatis framework.
According to the embodiment of the invention, the session object related to the transaction is firstly obtained by utilizing the spring-based MyBatis frame, and then the connection attribute value is obtained according to the database connection object, so that the connection attribute value is efficiently and quickly obtained.
According to an embodiment of the invention, a session object related to a transaction is acquired, wherein the session object comprises a database connection object, and the database connection object comprises a method for operating a database; acquiring a database connection object according to the session object; and obtaining a connection attribute value according to the database connection object, and preparing for determining the operation mode of the transaction according to the connection attribute value.
According to an embodiment of the invention, the connection attribute value comprises an auto-commit attribute value.
According to the embodiment of the invention, the database defaults to a transaction automatic commit mode, namely, the automatic commit attribute value is 1 (or true), at this time, each code statement in the transaction is automatically executed as a single transaction, and the operation mode of the transaction is a non-transaction operation mode. In the case where the automatic commit mode of the database needs to be turned off to ensure consistency of the processed data in the database, the automatic commit mode of the database needs to be reset, i.e., the automatic commit attribute value is 0 (or false).
According to the embodiment of the invention, the automatic submission attribute value reflects the operation mode of the transaction, so that the operation mode of the transaction can be further accurately determined according to the automatic submission attribute value.
According to an embodiment of the present invention, the method for determining a transaction running mode further includes:
detecting a call link related to the transaction under the condition that the connection attribute value is not equal to the second preset value, so as to obtain a first detection result;
and reconfiguring the connection attribute value according to the first detection result.
According to the embodiment of the invention, under the condition that the connection attribute value is not equal to the second preset value, the @ transmission annotation related to the propagation attribute value is not effective under the spring framework, and the running mode of the transaction is incorrect.
According to the embodiment of the invention, the first detection result is obtained by detecting the call link related to the transaction, the connection attribute value is reconfigured according to the first detection result, and the purpose of quickly reading and positioning the defect on the call link related to the transaction according to the first detection result is achieved, so that the connection attribute value is reconfigured after the defect of the call link related to the transaction is quickly corrected, and the transaction operation mode corresponding to the connection attribute value is quickly obtained.
According to an embodiment of the present invention, the first detection result includes a second detection result and a third detection result, and detecting the call link related to the transaction to obtain the first detection result includes:
respectively detecting the propagation attribute values of all the transactions on the call link to obtain a second detection result;
and respectively detecting the output results of all the transactions on the call link to obtain a third detection result.
According to an embodiment of the invention, the second detection result characterizes whether the propagation attribute values corresponding to the transactions on the call link respectively set an exception.
According to an embodiment of the invention, each transaction on the call link may include, for example, transaction G and transaction H, with transaction G calling transaction H. The transaction G may be performed in a transaction manner, the propagation attribute value associated with the transaction G may be REQUIRED, the transaction H may be performed in a non-transaction manner, and the propagation attribute value associated with the transaction H may be not_supported. In the case where it is detected that the propagation attribute value associated with the transaction G is equal to the requested, it is explained that there is no problem in the propagation attribute value setting of the transaction G, and in the case where it is detected that the propagation attribute value associated with the transaction H is equal to the not_supported, it is explained that there is no problem in the propagation attribute value setting of the transaction H.
According to an embodiment of the invention, the third detection result characterizes whether the program code corresponding to each transaction on the call link is defective or not.
According to the embodiment of the invention, in the case that @ TransactionAnnotation under the spring framework is configured on the interface method or the interface class configured with the public modifier, the @ TransactionAnnotation will only take effect, and the spring framework will only configure the propagation attribute value of the transaction corresponding to the interface method or the interface class according to the @ TransactionAnnotation. Thus, the modifiers of the methods on the call link corresponding to each transaction can be detected to determine if the public modifier is problematic.
According to the embodiment of the invention, the second detection result is obtained by respectively detecting the propagation attribute values of all the transactions on the call link; and respectively detecting the output results of each transaction on the calling link to obtain a third detection result, so that the defect of the calling link related to the transaction can be rapidly positioned according to the second detection result and the third detection result, and further, the defect of the calling link related to the transaction can be rapidly corrected later, the @ transaction annotation under the spring framework is validated, and the transaction operation mode corresponding to the @ transaction annotation is rapidly obtained.
According to an embodiment of the invention, a transaction processes data in a database corresponding to the transaction based on an object relational mapping framework (MyBatis).
According to embodiments of the present disclosure, a transaction may also be a process of processing data in a database corresponding to the transaction based on an object relationship mapping framework.
According to the embodiment of the invention, the MyBatis avoids almost all the work of JDBC codes, manually setting parameters and acquiring a result set, so that the transaction processes the data in the database corresponding to the transaction based on the object relation mapping frame, database connection is not manually created, a large amount of parameter configuration work can be reduced, and the data in the database can be obtained or modified efficiently and quickly.
FIG. 3 is a flow chart illustrating another method of determining a transaction run mode according to an embodiment of the present invention.
As shown in fig. 3, in step 310, the spring framework starts a transaction corresponding to method N, which is configured with @ transaction (request = request) comments, i.e., the propagation attribute value request of the transaction corresponding to method N is set to request, at which point the transaction corresponding to method N runs transactionally.
At step 320, the spring framework begins executing a transaction corresponding to method N.
In step 330, the transaction corresponding to method N invokes the transaction corresponding to embedded method M, since embedded method M is configured with @ transaction = transmission. Not_supported annotation, i.e., the transmission attribute value transmission of the transaction corresponding to embedded method M is set to not_supported, the transaction corresponding to method M is running in a non-Transactional manner, at which time the transaction corresponding to method N is suspended.
In step 340, a transaction corresponding to embedded method M is performed. Step 340 further includes step 341, before executing the transaction corresponding to the embedded method M, the determining method of the transaction running mode according to the embodiment of the present invention detects an auto-commit attribute value of the database corresponding to the transaction, and determines whether the transaction corresponding to the embedded method M runs in a non-transaction mode.
In step 340, in the case where it is determined that the transaction corresponding to the embedded method M is running in a non-transactional manner, the data in the database corresponding to the transaction is processed with the transaction corresponding to the embedded method.
In step 350, the execution of the transaction corresponding to the embedded method M is ended, the transaction corresponding to the embedded method M is submitted, and the transaction corresponding to the method N is restored.
In step 360, the transaction corresponding to method N continues to be executed, and the data in the database corresponding to the transaction is processed using the transaction corresponding to method N.
At step 370, the transaction corresponding to method N is committed and execution of the transaction corresponding to method N ends.
As shown in fig. 3, before executing the transaction corresponding to the embedded method M, by detecting the automatic commit attribute value of the database corresponding to the transaction, the operation mode of the transaction corresponding to the embedded method M is further ensured, and the accuracy of the operation mode of the transaction corresponding to the embedded method M is ensured.
Based on the method for determining the transaction operation mode, the invention also provides a device for determining the transaction operation mode. The device will be described in detail below in connection with fig. 4.
Fig. 4 shows a block diagram of a determination apparatus of a transaction operation mode according to an embodiment of the present invention.
As shown in fig. 4, the determining apparatus 400 of the transaction operation mode of this embodiment includes a setting module 410, an obtaining module 420, and a determining module 430.
A setting module 410, configured to set a propagation attribute value of the transaction to a first preset value. In an embodiment, the setting module 410 may be configured to perform the operation S210 described above, which is not described herein.
And an obtaining module 420, configured to obtain a connection attribute value of the database corresponding to the transaction, where the connection attribute value characterizes an operation mode adopted by the transaction when processing data in the database, and the connection attribute value is configured according to the propagation attribute value. In an embodiment, the obtaining module 420 may be configured to perform the operation S220 described above, which is not described herein.
The determining module 430 is configured to determine, according to the connection attribute value, an operation mode of the transaction if the connection attribute value is equal to the second preset value. In an embodiment, the determining module 430 may be configured to perform the operation S230 described above, which is not described herein.
According to an embodiment of the present invention, before obtaining a connection attribute value of a database corresponding to a transaction, a determining device for a transaction operation mode includes a first configuration module.
And the first configuration module is used for configuring the connection attribute value according to the propagation attribute value.
According to the embodiment of the invention, the acquisition module comprises a session object acquisition sub-module and a connection attribute value sub-module.
A session object obtaining sub-module, configured to obtain a session object related to a transaction, where the session object includes a database connection object, and the database connection object includes a method for operating a database; and acquiring the database connection object according to the session object.
The connection attribute value obtaining sub-module is used for obtaining the connection attribute value according to the database connection object.
According to an embodiment of the invention, the connection attribute value comprises an auto-commit attribute value.
According to the embodiment of the invention, the determining device of the transaction operation mode further comprises a first detection result obtaining module and a second configuration module.
The first detection result obtaining module is used for detecting the call link related to the transaction under the condition that the connection attribute value is not equal to the second preset value, so as to obtain a first detection result.
And the second configuration module is used for reconfiguring the connection attribute value according to the first detection result.
According to the embodiment of the invention, the first detection result comprises a second detection result and a third detection result, and the first detection result obtaining module comprises a second detection result obtaining sub-module and a third detection result obtaining sub-module.
And the second detection result obtaining submodule is used for respectively detecting the propagation attribute values of all the transactions on the call link to obtain a second detection result.
And the third detection result obtaining submodule is used for respectively detecting the output results of all the transactions on the call link to obtain a third detection result.
According to an embodiment of the invention, a transaction processes data in a database corresponding to the transaction based on an object relationship mapping framework.
Any of the plurality of modules of the setting module 410, the obtaining module 420, and the determining module 430 may be combined in one module to be implemented, or any of the plurality of modules may be split into a plurality of modules according to an embodiment of the present invention. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present invention, at least one of the setup module 410, the acquisition module 420, and the determination module 430 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of any of three implementations of software, hardware, and firmware. Alternatively, at least one of the setting module 410, the obtaining module 420, and the determining module 430 may be at least partially implemented as a computer program module, which when executed, may perform the corresponding functions.
Fig. 5 shows a block diagram of an electronic device adapted to implement a method of determining a transaction run mode according to an embodiment of the invention.
As shown in fig. 5, an electronic device 500 according to an embodiment of the present invention includes a processor 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 503. The processor 501 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 501 may also include on-board memory for caching purposes. The processor 501 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flow according to an embodiment of the invention.
In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are stored. The processor 501, ROM 502, and RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flow according to an embodiment of the present invention by executing programs in the ROM 502 and/or the RAM 503. Note that the program may be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of the method flow according to embodiments of the present invention by executing programs stored in the one or more memories.
According to an embodiment of the invention, the electronic device 500 may further comprise an input/output (I/O) interface 505, the input/output (I/O) interface 505 also being connected to the bus 504. The electronic device 500 may also include one or more of the following components connected to an input/output (I/O) interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to an input/output (I/O) interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
The present invention also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present invention.
According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the invention, the computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the method shown in the flowcharts. When the computer program product runs in a computer system, the program code is used for enabling the computer system to implement the method for determining the transaction running mode provided by the embodiment of the invention.
The above-described functions defined in the system/apparatus of the embodiment of the present invention are performed when the computer program is executed by the processor 501. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or installed from a removable medium 511 via the communication portion 509. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the embodiment of the present invention are performed when the computer program is executed by the processor 501. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
According to embodiments of the present invention, program code for carrying out computer programs provided by embodiments of the present invention may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or in assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the invention and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the invention. In particular, the features recited in the various embodiments of the invention and/or in the claims can be combined in various combinations and/or combinations without departing from the spirit and teachings of the invention. All such combinations and/or combinations fall within the scope of the invention.
The embodiments of the present invention are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the invention is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the invention, and such alternatives and modifications are intended to fall within the scope of the invention.
Claims (10)
1. A method for determining a transaction execution mode, comprising:
setting the propagation attribute value of the transaction to be a first preset value;
Acquiring a connection attribute value of a database corresponding to the transaction, wherein the connection attribute value characterizes an operation mode adopted by the transaction when processing data in the database, and the connection attribute value is configured according to the propagation attribute value; and
and under the condition that the connection attribute value is equal to a second preset value, determining the running mode of the transaction according to the connection attribute value.
2. The method of claim 1, comprising, prior to the obtaining the connection attribute value for the database corresponding to the transaction:
and configuring the connection attribute value according to the propagation attribute value.
3. The method of claim 2, wherein the obtaining the connection attribute value of the database corresponding to the transaction comprises:
acquiring a session object related to the transaction, wherein the session object comprises a database connection object, and the database connection object comprises a method for operating the database; acquiring the database connection object according to the session object;
and obtaining the connection attribute value according to the database connection object.
4. The method of claim 1 or 2, wherein the connection attribute value comprises an auto-commit attribute value.
5. The method as recited in claim 1, further comprising:
detecting a call link related to the transaction under the condition that the connection attribute value is not equal to the second preset value, so as to obtain a first detection result;
and reconfiguring the connection attribute value according to the first detection result.
6. The method of claim 5, wherein the first detection result comprises a second detection result and a third detection result, and detecting the call link associated with the transaction to obtain the first detection result comprises:
detecting propagation attribute values of all the transactions on the call link respectively to obtain a second detection result;
and respectively detecting output results of all the transactions on the call link to obtain the third detection result.
7. The method of claim 1, wherein the transaction processes data in a database corresponding to the transaction based on an object relational mapping framework.
8. A transaction run mode determining apparatus, comprising:
the setting module is used for setting the propagation attribute value of the transaction to be a first preset value;
The acquisition module is used for acquiring a connection attribute value of a database corresponding to the transaction, wherein the connection attribute value represents an operation mode adopted by the transaction when processing data in the database, and the connection attribute value is configured according to the propagation attribute value; and
and the determining module is used for determining the operation mode of the transaction according to the connection attribute value under the condition that the connection attribute value is equal to a second preset value.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310552482.0A CN116302845B (en) | 2023-05-17 | 2023-05-17 | Method and device for determining transaction operation mode, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310552482.0A CN116302845B (en) | 2023-05-17 | 2023-05-17 | Method and device for determining transaction operation mode, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116302845A true CN116302845A (en) | 2023-06-23 |
CN116302845B CN116302845B (en) | 2023-08-15 |
Family
ID=86798087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310552482.0A Active CN116302845B (en) | 2023-05-17 | 2023-05-17 | Method and device for determining transaction operation mode, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116302845B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150242246A1 (en) * | 2014-02-27 | 2015-08-27 | International Business Machines Corporation | Adaptive process for data sharing with selection of lock elision and locking |
CN106104478A (en) * | 2014-03-14 | 2016-11-09 | 国际商业机器公司 | Condition affairs and instruction |
US9830223B1 (en) * | 2015-01-26 | 2017-11-28 | Intel Corporation | Methods for repairing a corrupted database to a new, correct state |
CN107688487A (en) * | 2011-09-09 | 2018-02-13 | 甲骨文国际公司 | For the method and system for the state for recovering database session |
CN111813583A (en) * | 2020-07-28 | 2020-10-23 | 厦门市易联众易惠科技有限公司 | Transaction management method, device, equipment and storage medium under micro-service architecture |
CN111858641A (en) * | 2020-07-30 | 2020-10-30 | 中国工商银行股份有限公司 | Transaction processing method and device, electronic equipment and readable storage medium |
US20210133180A1 (en) * | 2019-10-31 | 2021-05-06 | Salesforce.Com, Inc. | Selectively publishing an event responsive to an operation on a database in a transaction which is rolled back or committed |
CN112882910A (en) * | 2021-01-22 | 2021-06-01 | 中国建设银行股份有限公司 | Interface pressure testing method and device of workflow engine |
CN113778699A (en) * | 2020-10-23 | 2021-12-10 | 北京沃东天骏信息技术有限公司 | Distributed transaction processing method, device, computer system and readable storage medium |
US11222003B1 (en) * | 2016-09-28 | 2022-01-11 | Amazon Technologies, Inc. | Executing transactions for a hierarchy of data objects stored in a non-transactional data store |
CN113986974A (en) * | 2021-10-27 | 2022-01-28 | 建信金融科技有限责任公司 | Database transaction management method and device and database transaction recovery method and device |
CN114281488A (en) * | 2021-12-27 | 2022-04-05 | 山东浪潮科学研究院有限公司 | Transaction submission control method and system for distributed database |
CN115237889A (en) * | 2022-08-03 | 2022-10-25 | 平安付科技服务有限公司 | Database switching method and device, storage medium and computer equipment |
-
2023
- 2023-05-17 CN CN202310552482.0A patent/CN116302845B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107688487A (en) * | 2011-09-09 | 2018-02-13 | 甲骨文国际公司 | For the method and system for the state for recovering database session |
US20150242246A1 (en) * | 2014-02-27 | 2015-08-27 | International Business Machines Corporation | Adaptive process for data sharing with selection of lock elision and locking |
CN106104478A (en) * | 2014-03-14 | 2016-11-09 | 国际商业机器公司 | Condition affairs and instruction |
US9830223B1 (en) * | 2015-01-26 | 2017-11-28 | Intel Corporation | Methods for repairing a corrupted database to a new, correct state |
US11222003B1 (en) * | 2016-09-28 | 2022-01-11 | Amazon Technologies, Inc. | Executing transactions for a hierarchy of data objects stored in a non-transactional data store |
US20210133180A1 (en) * | 2019-10-31 | 2021-05-06 | Salesforce.Com, Inc. | Selectively publishing an event responsive to an operation on a database in a transaction which is rolled back or committed |
CN111813583A (en) * | 2020-07-28 | 2020-10-23 | 厦门市易联众易惠科技有限公司 | Transaction management method, device, equipment and storage medium under micro-service architecture |
CN111858641A (en) * | 2020-07-30 | 2020-10-30 | 中国工商银行股份有限公司 | Transaction processing method and device, electronic equipment and readable storage medium |
CN113778699A (en) * | 2020-10-23 | 2021-12-10 | 北京沃东天骏信息技术有限公司 | Distributed transaction processing method, device, computer system and readable storage medium |
CN112882910A (en) * | 2021-01-22 | 2021-06-01 | 中国建设银行股份有限公司 | Interface pressure testing method and device of workflow engine |
CN113986974A (en) * | 2021-10-27 | 2022-01-28 | 建信金融科技有限责任公司 | Database transaction management method and device and database transaction recovery method and device |
CN114281488A (en) * | 2021-12-27 | 2022-04-05 | 山东浪潮科学研究院有限公司 | Transaction submission control method and system for distributed database |
CN115237889A (en) * | 2022-08-03 | 2022-10-25 | 平安付科技服务有限公司 | Database switching method and device, storage medium and computer equipment |
Non-Patent Citations (3)
Title |
---|
CALVIN_IT: "Spring 事务方法与非事务方法相互调用 @Transactional 注解失效分析", Retrieved from the Internet <URL:https://blog.csdn.net/qq_37840993/article/details/121137115> * |
YOULUBANK: "@Transaction注解及失效详解", Retrieved from the Internet <URL:https://blog.csdn.net/m0_37787662/article/details/124161856> * |
查理斯·耀猿: "非事务方法与事务方法执行相互调用", Retrieved from the Internet <URL:https://blog.csdn.net/weixin_45937536/article/details/123532393> * |
Also Published As
Publication number | Publication date |
---|---|
CN116302845B (en) | 2023-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10437795B2 (en) | Upgrading systems with changing constraints | |
US10613970B1 (en) | Method and system for managing deployment of software application components based on software performance data | |
US8762929B2 (en) | System and method for exclusion of inconsistent objects from lifecycle management processes | |
US7962788B2 (en) | Automated treatment of system and application validation failures | |
US11561889B2 (en) | Orchestration for automated performance testing | |
US8769487B2 (en) | Configurable auto content testing framework for technical documentation | |
US9652220B2 (en) | Zero down-time deployment of new application versions | |
CN114925084B (en) | Distributed transaction processing method, system, equipment and readable storage medium | |
US20140026120A1 (en) | Unit testing an enterprise javabeans (ejb) bean class | |
CN113138757B (en) | Front-end code automatic generation method, device, server, system and medium | |
WO2021080831A1 (en) | Updating a metadata structure for a firmware update | |
CN112650526A (en) | Version consistency detection method and device, electronic equipment and medium | |
CN116302845B (en) | Method and device for determining transaction operation mode, electronic equipment and storage medium | |
CN114677114A (en) | Approval process generation method and device based on graph dragging | |
CN111859403A (en) | Method and device for determining dependency vulnerability, electronic equipment and storage medium | |
US9836353B2 (en) | Reconstruction of system definitional and state information | |
CN110704320A (en) | Control operation method and device | |
CN113515326B (en) | Data conversion method, device, electronic equipment and storage medium | |
CN118394659A (en) | Multi-database scene automatic test method, device, equipment, medium and product | |
US20240005200A1 (en) | Generation of inference logic from training-time artifacts for machine learning model deployments | |
CN116401022A (en) | Method and device for processing operation log data of distributed transaction | |
CN116881367A (en) | Gray scale issuing method, device, equipment, medium and program product for storage process | |
CN115421779A (en) | Object storage method and device, electronic equipment and computer readable storage medium | |
CN117873748A (en) | Transaction chain execution method, device and equipment | |
CN115269660A (en) | Cache data processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |