
The usual concept is that transactions are only related to the database.
Transactions must comply with the ACID principles established by ISO/IEC. ACID is the abbreviation for atomicity, consistency, isolation and durability. The atomicity of a transaction means that any failure during transaction execution will cause any modifications made by the transaction to become invalid. Consistency means that when a transaction fails, all data affected by the transaction should be restored to the state before the transaction was executed. Isolation means that modifications to data during transaction execution are not visible to other transactions before the transaction is committed. Persistence means that the status of the submitted data should be correct when the transaction execution fails.
In layman’s terms, a transaction is a set of atomic operation units. From a database perspective, it is a set of SQL instructions. Either all of them are executed successfully. If there is an error in the execution of one of the instructions for some reason, the previous execution will be cancelled. all instructions passed. The simpler answer is: either all executions are successful, or they are canceled and not executed.
Since the concept of transaction comes from the database, what is a Java transaction?
In fact, if a Java application system wants to operate a database, it is implemented through JDBC. Addition, modification, and deletion are all implemented indirectly through corresponding methods, and transaction control is also transferred to the Java program code accordingly. Therefore, database operation transactions are customarily called Java transactions.
The above is the detailed content of What is transaction in JAVA. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver CS6
Visual web development tools

Atom editor mac version download
The most popular open source editor

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.





