Java: reusing the Database in watches seems to hang

I tried using watches and I’m running into a problem. If I try to run another transaction in the .handle function for my watch against the same Database object, it never runs and seems to block forever. But in the same place (the .handle for the watch), if I get another Database by calling .open on .selectAPIVersion, things work as expected.

I’m confused, because a while ago (my projects are not moving fast, it seems) I asked a question about the Database object (Java: concurrency questions), and from @ajbeamon’s reply got the impression that it can be used all over the place.

(context: I’m working on Clojure bindings, so that I can use FoundationDB in my code)

Responding to myself: operator error. The Database was being implicitly closed, because I was using with-open. After making sure a single FDBDatabase is used (and isn’t closed), things work fine. Sorry for the noise.