Keywords: Savepoints, releasing

# Releasing a savepoint

The method Connection.releaseSavepoint takes a Savepoint object as a parameter and removes it from the current transaction. Once a savepoint has been released, attempting to reference it in a rollback operation will cause an SQLException to be thrown.

Any savepoints that have been created in a transaction are automatically released and become invalid when the transaction is committed or when the entire transaction is rolled back.

Rolling a transaction back to a savepoint automatically releases and makes invalid any other savepoints created after the savepoint in question.

Parent topic: java.sql.Savepoint interface
Related concepts
Setting and rolling back to a savepoint
Rules for savepoints
Related reference
Restrictions on savepoints