mirror of
https://github.com/corda/corda.git
synced 2025-06-16 06:08:13 +00:00
Hack around database-with-observables issue
This commit is contained in:
@ -43,7 +43,10 @@ enum class TransactionIsolationLevel {
|
||||
}
|
||||
|
||||
private val _contextDatabase = ThreadLocal<CordaPersistence>()
|
||||
val contextDatabase get() = _contextDatabase.get() ?: error("Was expecting to find CordaPersistence set on current thread: ${Strand.currentStrand()}")
|
||||
var contextDatabase: CordaPersistence
|
||||
get() = _contextDatabase.get() ?: error("Was expecting to find CordaPersistence set on current thread: ${Strand.currentStrand()}")
|
||||
set(database) = _contextDatabase.set(database)
|
||||
val contextDatabaseOrNull: CordaPersistence? get() = _contextDatabase.get()
|
||||
|
||||
class CordaPersistence(
|
||||
val dataSource: DataSource,
|
||||
|
Reference in New Issue
Block a user