JdbcTransactionProvider
interface JdbcTransactionProvider
Interface for managing database connections and transactions. Decouples the core logic from specific transaction management implementations (like Spring).
Each DataAccess instance is backed by exactly one JdbcTransactionProvider.
Inheritors
Functions
Link copied to clipboard
Applies the current transaction timeout to the given statement.
Link copied to clipboard
abstract fun <T> execute(propagation: TransactionPropagation, isolation: IsolationLevel = IsolationLevel.DEFAULT, readOnly: Boolean = false, timeoutSeconds: Int? = null, block: (TransactionStatus) -> T): T
Executes a block of code within a transaction context.
Link copied to clipboard
Obtains a connection for the current execution context. If a transaction is active, returns the connection bound to that transaction. Otherwise, returns a new connection from the dataSource.
Link copied to clipboard
Releases the given connection. If the connection is part of an active transaction, it is NOT closed. Otherwise, it is returned to the pool (closed).