# SpringTransactionManager

class SpringTransactionManager(dataSource: DataSource, databaseConfig: DatabaseConfig = DatabaseConfig {}, showSql: Boolean = false) : AbstractPlatformTransactionManager

Transaction Manager implementation that builds on top of Spring's standard transaction workflow.

#### Parameters

dataSource

The data source that produces `Connection` objects.

databaseConfig

The configuration that defines custom properties to be used with connections. If none is specified, the default configuration values will be used.

#### Samples

org.jetbrains.exposed.spring.TestConfig

## Constructors

SpringTransactionManager
Link copied to clipboard
constructor(dataSource: DataSource, databaseConfig: DatabaseConfig = DatabaseConfig {}, showSql: Boolean = false)

## Properties

defaultTimeout
Link copied to clipboard
var defaultTimeout: Int
failEarlyOnGlobalRollbackOnly
Link copied to clipboard
var failEarlyOnGlobalRollbackOnly: Boolean
globalRollbackOnParticipationFailure
Link copied to clipboard
var globalRollbackOnParticipationFailure: Boolean
nestedTransactionAllowed
Link copied to clipboard
var nestedTransactionAllowed: Boolean
rollbackOnCommitFailure
Link copied to clipboard
var rollbackOnCommitFailure: Boolean
transactionExecutionListeners
Link copied to clipboard
var transactionExecutionListeners: MutableCollection<TransactionExecutionListener>
transactionSynchronization
Link copied to clipboard
var transactionSynchronization: Int
validateExistingTransaction
Link copied to clipboard
var validateExistingTransaction: Boolean

## Functions

addListener
Link copied to clipboard
open fun addListener(listener: TransactionExecutionListener)
commit
Link copied to clipboard
override fun commit(status: TransactionStatus)
getTransaction
Link copied to clipboard
override fun getTransaction(@Nullable definition: TransactionDefinition): TransactionStatus
rollback
Link copied to clipboard
override fun rollback(status: TransactionStatus)
setTransactionSynchronizationName
Link copied to clipboard
fun setTransactionSynchronizationName(constantName: String)