Section 24.10 Transaction Processing

• Transaction processing (p. 1098) enables a program that interacts with a database to treat a database operation (or set of operations) as a single operation—known as an atomic operation (p. 1099) or a transaction (p. 1099).

• At the end of a transaction, a decision can be made to either commit or roll back the transaction.

• Committing a transaction (p. 1099) finalizes the database operation(s)—inserts, updates and deletes cannot be reversed without performing a new database operation.

• Rolling back a transaction (p. 1099) leaves the database in its state prior to the database operation.

• Java provides transaction processing via methods of interface Connection.

• Method setAutoCommit (p. 1099) specifies ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.