Dear Simon,
Sorry for letting you wait. I discarded my first answer to you, because I had some error messages that I couldn’t reproduce later (possibly caused by an existing DB1 database instance?).
You have already described very well how the starvation is caused. I saw that (and I was not sure why) br.readLine() is called three times in the secondary read thread. However, the behavior didn’t change after reducing it to a single call.
I must admit I haven’t digged into the details. My initial assumption is that the deadlock is eventually not caused by our client/server code, but rather to the buffering of the input stream. I would indeed recommend to stick with the elegant blocking queue approach, and I would hope that the decreased performance is hardly measurable.
More feedback on your experiences is welcome, Christian