broker = pool.get();
broker = pool.get(session.getUser());
	public int xupdateResource(		String sessionId,		String documentName,		String xupdate)		throws RemoteException {		DBBroker broker = null;		Session session = getSession(sessionId);		try {			broker = pool.get();			Document doc = broker.getDocument(documentName);			if (doc == null)				throw new RemoteException(					"document " + documentName + " not found");			DocumentSet docs = new DocumentSet();			docs.add(doc);			XUpdateProcessor processor =				new XUpdateProcessor(broker, docs);			Modification modifications[] =				processor.parse(new InputSource(new StringReader(xupdate)));			long mods = 0;			for (int i = 0; i < modifications.length; i++) {				mods += modifications[i].process();				broker.flush();			}			return (int) mods;		} catch (ParserConfigurationException e) {			throw new RemoteException(e.getMessage(), e);		} catch (IOException e) {			throw new RemoteException(e.getMessage(), e);		} catch (EXistException e) {			throw new RemoteException(e.getMessage(), e);		} catch (SAXException e) {			throw new RemoteException(e.getMessage(), e);		} catch (PermissionDeniedException e) {			throw new RemoteException(e.getMessage(), e);		} catch (XPathException e) {			throw new RemoteException(e.getMessage(), e);		} finally {			pool.release(broker);		}	}