} finally {
} catch (ReadOnlyException e) { throw new PermissionDeniedException(DATABASE_IS_READ_ONLY); } finally {
	protected void freeCollection(short id) throws ReadOnlyException {//		LOG.debug("freeing collection " + id);		Value key = new Value("__free_collection_id");		Lock lock = collectionsDb.getLock();		try {			lock.acquire(Lock.WRITE_LOCK);			Value value = collectionsDb.get(key);			if (value != null) {				byte[] data = value.getData();				byte[] ndata = new byte[data.length + 2];				System.arraycopy(data, 0, ndata, 2, data.length);				ByteConversion.shortToByte(id, ndata, 0);				collectionsDb.put(key, ndata, true);			} else {				byte[] data = new byte[2];				ByteConversion.shortToByte(id, data, 0);				collectionsDb.put(key, data, true);			}		} catch (LockException e) {			LOG.warn("failed to acquire lock on collections store", e);		} finally {			lock.release();		}	}