Collection collection = broker.getCollection(collectionName);
collection = broker.openCollection(collectionName, Lock.WRITE_LOCK);
	public void remove(User user, String docPath) throws Exception {		DBBroker broker = null;		try {			broker = brokerPool.get(user);			int p = docPath.lastIndexOf('/');			if (p < 0 || p == docPath.length() - 1)				throw new EXistException("Illegal document path");			String collectionName = docPath.substring(0, p);			String docName = docPath.substring(p + 1);			Collection collection = broker.getCollection(collectionName);			if (collection == null)				throw new EXistException("Collection " + collectionName						+ " not found");			DocumentImpl doc = collection.getDocument(broker, docName);			if(doc == null)				throw new EXistException("Document " + docPath + " not found");			if(doc.getResourceType() == DocumentImpl.BINARY_FILE)				collection.removeBinaryResource(broker, doc);			else				collection.removeDocument(broker, docName);			documentCache.clear();		} finally {			brokerPool.release(broker);		}	}