java中事物是处理数据库的还是spring中的事物啊?哪个大神详细的给解释下,谢谢!
大家讲道理
大家讲道理 2017-04-17 13:27:59
0
4
600

对java的特性一直是门外汉!

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(4)
迷茫

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.

Peter_Zhu

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template