On 2/3/08, Sam Halliday <sam.halliday@gmail.com> wrote:
- is there a thread-safe version of HTree.keys or HTree.values that
would allow me to add/remove entries in another thread whilst I am
iterating all the keys/values? Or is this the kind of operation that
one must obtain a lock for?

No, there isn't.

- there doesn't seem to be a way to explicitly start a transaction,
just commit one. Is the start of a transaction determined from certain
actions (e.g. an HTree.put or remove)? If so... is a transaction
limited to a single thread?

Yes, it is implicit.    JDBM does not support multiple outstanding transactions.

- what happens if 2 threads put different entries (with different
keys) into a HTree at the same time... these are non-conflicting
transactions so I would not expect there to be a problem. Should I
ever expect an exception in that situation? Not knowing where the
transaction begins, it might be the case that the last committer wins.

This case doesn't apply since there's no possibility of having multiple transactions.  You are responsible for data synchronization between the threads.

alex