Skip to content

Commit

Permalink
#365 "No transaction in context" after context refresh with spring-bo…
Browse files Browse the repository at this point in the history
…ot-devtools

#407 "No transaction in context" with multiple Spring contexts in one JVM
  • Loading branch information
Tapac committed Oct 23, 2018
1 parent ab869c3 commit e88b1f9
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class SpringTransactionManager(dataSource: DataSource,
private fun initTransaction(): Transaction {
val connection = (TransactionSynchronizationManager.getResource(dataSource) as ConnectionHolder).connection
val transactionImpl = SpringTransaction(connection, db, currentOrNull())
TransactionManager.resetCurrent(this)
return Transaction(transactionImpl).apply {
TransactionSynchronizationManager.bindResource(this@SpringTransactionManager, this)
}
Expand Down

0 comments on commit e88b1f9

Please sign in to comment.