spring-framework / org.springframework.jdbc.datasource / JdbcTransactionObjectSupport

JdbcTransactionObjectSupport

abstract class JdbcTransactionObjectSupport : SavepointManager, SmartTransactionObject

Convenient base class for JDBC-aware transaction objects. Can contain a ConnectionHolder with a JDBC Connection, and implements the SavepointManager interface based on that ConnectionHolder.

Allows for programmatic management of JDBC java.sql.Savepoint. Spring's org.springframework.transaction.support.DefaultTransactionStatus automatically delegates to this, as it autodetects transaction objects which implement the SavepointManager interface.

Author
Juergen Hoeller

Since
1.1

See Also
DataSourceTransactionManager

Constructors

<init>

JdbcTransactionObjectSupport()

Convenient base class for JDBC-aware transaction objects. Can contain a ConnectionHolder with a JDBC Connection, and implements the SavepointManager interface based on that ConnectionHolder.

Allows for programmatic management of JDBC java.sql.Savepoint. Spring's org.springframework.transaction.support.DefaultTransactionStatus automatically delegates to this, as it autodetects transaction objects which implement the SavepointManager interface.

Functions

createSavepoint

open fun createSavepoint(): Any

This implementation creates a JDBC 3.0 Savepoint and returns it.

flush

open fun flush(): Unit

getConnectionHolder

open fun getConnectionHolder(): ConnectionHolder

getPreviousIsolationLevel

open fun getPreviousIsolationLevel(): Int

hasConnectionHolder

open fun hasConnectionHolder(): Boolean

isSavepointAllowed

open fun isSavepointAllowed(): Boolean

releaseSavepoint

open fun releaseSavepoint(savepoint: Any): Unit

This implementation releases the given JDBC 3.0 Savepoint.

rollbackToSavepoint

open fun rollbackToSavepoint(savepoint: Any): Unit

This implementation rolls back to the given JDBC 3.0 Savepoint.

setConnectionHolder

open fun setConnectionHolder(connectionHolder: ConnectionHolder): Unit

setPreviousIsolationLevel

open fun setPreviousIsolationLevel(previousIsolationLevel: Int): Unit

setSavepointAllowed

open fun setSavepointAllowed(savepointAllowed: Boolean): Unit