O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting ready

A transaction is a unit of work that includes one or many operations that change data. If successful, all the data changes are committed (applied to the database). If one of the operations errors out or the transaction is rolled back, then none of the changes included in the transaction will be applied to the database.

Transaction properties are set up on the Connection object. They can be changed without closing the connection, so different transactions can reuse the same Connection object.

JDBC allows transaction control only for CRUD operations. Table modification (CREATE TABLE, ALTER TABLE, and so on) is committed automatically and cannot be controlled from the Java code.

By default, a CRUD operation transaction is set to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required