- JDBC 4.0 and Oracle JDeveloper for J2EE Development
- Deepak Vohra
- 82字
- 2025-03-31 07:06:41
Savepoint Interface
Savepoint
is a new interface in JDBC 3.0 specification. A Savepoint is a point within a transaction up to which the changes made in the transaction are rolled back, if the transaction is rolled back with the rollback()
method. All changes before the savepoint are implemented when a transaction is rolled back. A savepoint is set with the overloaded setSavepoint()
method:
Savepoint savepoint=connection.setSavepoint(); Savepoint savepoint=connection.setSavepoint("savepointName");
The getSavepointId()
method returns the savepoint id, and the getSavepointName()
method returns the savepoint name.