broker = pool.get(); if (broker.getDocument(session.getUser(), path) == null) return false; broker.removeDocument(session.getUser(), path);
broker = pool.get(session.getUser()); int p = path.lastIndexOf('/'); if (p < 0 || p == path.length() - 1) throw new EXistException("Illegal document path"); String collectionName = path.substring(0, p); path = path.substring(p + 1); Collection collection = broker.getCollection(collectionName); if (collection == null) throw new EXistException( "Collection " + collectionName + " not found"); collection.removeDocument(broker, path);
	public boolean removeDocument(String sessionId, String path) throws RemoteException {		Session session = SessionManager.getInstance().getSession(sessionId);		DBBroker broker = null;		try {			broker = pool.get();			if (broker.getDocument(session.getUser(), path) == null)				return false;			broker.removeDocument(session.getUser(), path);			return true;		} catch (Exception e) {			LOG.debug(e.getMessage(), e);			throw new RemoteException(e.getMessage(), e);		} finally {			pool.release(broker);		}	}