SpringManagedTransactionManager

TransactionManager implementation that delegates all transactions to the Spring framework.

This class enables the Spring support, and it's used by Database instances created by Database.connectWithSpringSupport function. Once the Spring support enabled, the transaction management will be delegated to the Spring framework, so the Database.useTransaction function is not available anymore, applications should use Spring's Transactional annotation instead.

Constructors

Link copied to clipboard
constructor(dataSource: DataSource)

Properties

Link copied to clipboard
open override val currentTransaction: Transaction? = null

The opened transaction of the current thread, null if there is no transaction opened.

Link copied to clipboard

the data source used to obtained connections, typically comes from Spring's application context.

Link copied to clipboard
open override val defaultIsolation: TransactionIsolation? = null

The default transaction isolation, null for the default isolation level of the underlying datastore.

Functions

Link copied to clipboard
open override fun newConnection(): Connection

Create a native JDBC connection to the database.

Link copied to clipboard
open override fun newTransaction(isolation: TransactionIsolation?): Nothing

Open a new transaction for the current thread using the specific isolation if there is no transaction opened.