Class Transaction

java.lang.Object
org.itsallcode.jdbc.Transaction
All Implemented Interfaces:
AutoCloseable, DbOperations

public final class Transaction extends Object implements DbOperations
A running database transaction. The transaction will be rolled back automatically in close() if not explicitly committed using commit() or rolled back using rollback() before.

Start a new transaction using SimpleConnection.startTransaction().

Operations are not allowed on a closed, committed or rolled back transaction.

Closing an already closed transaction is a no-op.