> What is the best way to manage multiple users in a multi-threaded
> environment like servlets?
If you use BaseX as a servlet, concurrent requests will automatically be queued as described in our article on transactions [1].
Hope this helps,
Christian
[1] http://docs.basex.org/wiki/Transaction_Management