Thanks for your answer. You are invited to also check out our latest stable snapshot [1]. I remember that one issue related to locking had been fixed in 7.8 (although I’m not sure how it should be related to your issue).
We are planning to have our own REST API server that uses XQJ to the baseX Db. We also want to run basexHttp API but will not be exposed to our clients. Just for internal consumption by our own API and few clients.
Do you think an embedded is best option? Or run baseX separately.
There are arguments for both options. If you use the BaseXHTTP, you can take advantage of the existing APIs and still use the BaseX clients to access the same server. When embedding BaseX, you can get better performance and directly work on the XQuery items when necessary, so it may depend on your use case.
Feel free to ask for more details, Christian