I dont think there is a standard JDBC but we have one on
HikariDataSource.close()
t
tapac
11/26/2019, 8:53 PM
Database.connect() doesn't create any real connection, but just collect all required data for it. So you don't need to disconnect anything. But if want unregister database and related TransactionManager please use TransactionManager.closeAndUnregister() function
tapac
11/26/2019, 8:53 PM
But if you want to close Connection pool use @spand advise
r
rikusen0335
11/27/2019, 7:20 AM
Thanks. And also sorry, could you please tell me what
closeAndUnregister()
?
I thought that would be
val db = Database.connection(...)
, but it isn't it.
rikusen0335
11/27/2019, 7:20 AM
I don't use Data Source so it's not for me now.
t
tapac
11/27/2019, 8:24 AM
Copy code
val db = Database.connect(...)
// .... your code
TransactionManager.closeAndUnregister(db)