https://kotlinlang.org logo
#exposed
Title
# exposed
б

Бежан Александр

10/10/2019, 11:34 AM
Hey guys. I need your help with suspended transactions. When I do:
Copy code
newSuspendedTransaction(<http://Dispatchers.IO|Dispatchers.IO>, database) {
    Ticket.all().count()
}
It fails with
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-199]
Database is H2
t

tapac

10/11/2019, 10:12 AM
Add DB_CLOSE_DELAY=-1 param instead of DB_CLOSE_ON_EXIT=FALSE http://www.h2database.com/html/features.html#in_memory_databases
12 Views