public void storeXMLResource(final Txn transaction, final DocumentImpl doc) {
final Lock lock = collectionsDb.getLock();
try {
lock.acquire(Lock.WRITE_LOCK);
final VariableByteOutputStream os = new VariableByteOutputStream(8);
doc.write(os);
final Value key = new CollectionStore.DocumentKey(doc.getCollection().getId(), doc.getResourceType(), doc.getDocId());
collectionsDb.put(transaction, key, os.data(), true);
//} catch (ReadOnlyException e) {