Filip Lastic
07/26/2022, 1:58 PMTransactionManager.closeAndUnregister(database)
TransactionManager.resetCurrent(TransactionManager.manager)
hikariDataSource.close()
// option 2
TransactionManager.closeAndUnregister(database)
TransactionManager.resetCurrent(null)
hikariDataSource.close()
I used Intellij memory check to verify everything works, but there are still some classes which weren't deleted. I mean ThreadLocalTransaction and ThreadLocalTransactionManager. It causes issues when I create new connection. Some transactions will be broken then.Filip Lastic
07/26/2022, 2:08 PMThreadLocalTransaction, there is something called EntityCache , but I am not sure why this reference exists because I don't use Exposed DAO API. Only DSL.