@thomasnield Thomas hello. I still got a problem with RxJava-JDBC.
I created a database on a singleThreadExecutor - like this
private val executor = Executors.newSingleThreadExecutor()
private val scheduler = Schedulers.from(executor)
val db: Database = fromDb.asynchronous(scheduler)
But now, initializing the database with the sample values started to fail - I have a couple of tables initialized like this
listOf(
Proxy(country = “RU”, provider = “Majordomo”, address = “8.68.78.78”),
Proxy(country = “GER”, provider = “Das Net”, address = “1.22.22.1"),
Proxy(country = “ISR”, provider = “Shalom IT”, address = “7.40.7.40”),
Proxy(systemDefault = true)).toObservable().flatMap {
Proxy.createNewReturn(it)
}.flatCollect().count().toBlocking().single()
And when I try to update the domain object from the view the following exceptions are thrown
java.lang.IllegalStateException: Not on FX application thread; currentThread = pool-2-thread-1
I have a couple of places where the object is added to compositeObservable like
controller.updatedNetwork.toObservable().subscribeBy(
onNext = { newP -> model.updateItem(newP) },
onError = { controller.errors.addError(it, “Network update problem”) }
)
Is there anything that could be done with all of that? Without the need of rewriting everything 😉