throw new RemoteException(e.getMessage(), e); } catch (LockException e) {
throw new RemoteException(e.getMessage(), e); } catch (XPathException e) {
    public int xupdate(java.lang.String sessionId, java.lang.String collectionName, java.lang.String xupdate) throws java.rmi.RemoteException {		DBBroker broker = null;		Session session = getSession(sessionId);        TransactionManager transact = pool.getTransactionManager();        Txn transaction = transact.beginTransaction();		try {			broker = pool.get(session.getUser());			Collection collection = broker.getCollection(collectionName);			if (collection == null) {                transact.abort(transaction);				throw new RemoteException(					"collection " + collectionName + " not found");            }			DocumentSet docs =				collection.allDocs(broker, new DocumentSet(), true, true);			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(transaction);				broker.flush();			}            transact.commit(transaction);			return (int) mods;		} catch (ParserConfigurationException e) {            transact.abort(transaction);			throw new RemoteException(e.getMessage(), e);		} catch (IOException e) {            transact.abort(transaction);            throw new RemoteException(e.getMessage(), e);		} catch (EXistException e) {            transact.abort(transaction);			throw new RemoteException(e.getMessage(), e);		} catch (SAXException e) {            transact.abort(transaction);			throw new RemoteException(e.getMessage(), e);		} catch (PermissionDeniedException e) {            transact.abort(transaction);			throw new RemoteException(e.getMessage(), e);		} catch (XPathException e) {            transact.abort(transaction);			throw new RemoteException(e.getMessage(), e);		} catch (LockException e) {            transact.abort(transaction);		    throw new RemoteException(e.getMessage(), e);        } finally {			pool.release(broker);		}	}