When using the sample Java client to store/retrieve binary/raw files I have to execute separate open/close commands. It is my understanding that this locks the database. In a multi-user scenario, such locking is undesirable as binary/raw files can be quite large. And since there is no alteration of the indexes etc during such operations, is there a better way? Also, why isn't there a corresponding retrieve method on the Java client, similar to the store method?
My code to store: BaseXClient session = new BaseXClient(host, port, username, password); session.execute("open " + database); session.store(path, inputStream); session.execute("close");
My code to retrieve: BaseXClient session = new BaseXClient(host, port, username, password); session.execute("open " + database); session.execute("retrieve " + path, outputStream); session.execute("close");
Thanks in advance!