broker = pool.get(); if (broker.getDocument(session.getUser(), path) != null) {
broker = pool.get(session.getUser()); if (broker.getDocument(path) != null) {
	public void store(		String sessionId,		byte[] data,		java.lang.String encoding,		java.lang.String path,		boolean replace)		throws RemoteException {		Session session = SessionManager.getInstance().getSession(sessionId);		DBBroker broker = null;		try {			broker = pool.get();			if (broker.getDocument(session.getUser(), path) != null) {				if (!replace)					throw new RemoteException(						"document " + path + " exists and parameter replace is set to false.");			}			String xml;			try {				xml = new String(data, encoding);			} catch (UnsupportedEncodingException e) {				throw new RemoteException(e.getMessage());			}			long startTime = System.currentTimeMillis();			Parser parser = new Parser(broker, session.getUser(), true);			Document doc = parser.parse(xml, path);			LOG.debug("flushing data files");			broker.flush();			LOG.debug(				"parsing " + path + " took " + (System.currentTimeMillis() - startTime) + "ms.");		} catch (Exception e) {			LOG.debug(e);			throw new RemoteException(e.getMessage(), e);		} finally {			pool.release(broker);		}	}