Charles, thanks for the examples. I first thought using the core API, like "new Add(doc).execute(context); ", but to get working you need conversions and ToString methods and loose the direct manipulation options. I needed a concurrent set up anyway.
What I also didn't get from the core library; when using multiple instances I got a FileLockException in the stack trace (as expected), but then the general message "org.basex.core.BaseXException: Improper use? Potential bug?" was shown. Maybe an error message about the filelock and concurrency would be clearer as its not a bug. There are some databases like SQLite that support concurrency (to some extend) while directly using a OS file system, but that lead often to unexpected results (locking on network shares for example).
basex-talk@mailman.uni-konstanz.de