Business, right? The concept of transactions is for databases. When Java performs database operations, it needs to ensure data integrity and consistency. When adding, deleting, or modifying, transactions must be performed. Transactions can be said to be a process.
This process has only two results, success or failure.
In spring, a transaction manager is generally configured. Combined with spring's AOP (aspect-oriented) feature, for example, when executing methods with insert, update, and delete as prefixes or suffixes, the transaction is started and the transaction is submitted after execution.
It is recommended to look at the transaction processing relationship of jdbc first. Because this is the basic foundation, if you understand this, what is in spring is just more beautifully encapsulated.
Concept
A transaction is a program execution unit that accesses and possibly updates various data items in the database. A transaction is usually caused by the execution of a user program written in a high-level database manipulation language or programming language (such as SQL, C++, or Java) and is defined by statements (or function calls) in the form of begin transaction and end transaction. A transaction consists of all operations performed between the beginning of the transaction and the end of the transaction.
====================================
Spring also supports database transactions.
However, transactions can be broader to other businesses. The core point is that a transaction consists of all operations performed between the beginning of the transaction (begin transaction) and the end of the transaction (end transaction), and it is atomic. If one operation fails, the transaction will fail. .
I don’t understand, what java transaction are you talking about? There is transaction processing to connect to db, you can use jdbc or spring hibernate
Business, right? The concept of transactions is for databases. When Java performs database operations, it needs to ensure data integrity and consistency. When adding, deleting, or modifying, transactions must be performed. Transactions can be said to be a process.
This process has only two results, success or failure.
In spring, a transaction manager is generally configured. Combined with spring's AOP (aspect-oriented) feature, for example, when executing methods with insert, update, and delete as prefixes or suffixes, the transaction is started and the transaction is submitted after execution.
It is recommended to look at the transaction processing relationship of jdbc first. Because this is the basic foundation, if you understand this, what is in spring is just more beautifully encapsulated.
Concept
A transaction is a program execution unit that accesses and possibly updates various data items in the database. A transaction is usually caused by the execution of a user program written in a high-level database manipulation language or programming language (such as SQL, C++, or Java) and is defined by statements (or function calls) in the form of begin transaction and end transaction. A transaction consists of all operations performed between the beginning of the transaction and the end of the transaction.
====================================
Spring also supports database transactions.
However, transactions can be broader to other businesses. The core point is that a transaction consists of all operations performed between the beginning of the transaction (begin transaction) and the end of the transaction (end transaction), and it is atomic. If one operation fails, the transaction will fail. .
I don’t understand, what java transaction are you talking about? There is transaction processing to connect to db, you can use jdbc or spring hibernate