docs = parent.collection.allDocs(broker, user, true);
docs = parent.collection.allDocs(broker, true);
	public long updateResource(String resource, String xupdate)		throws XMLDBException {		long start = System.currentTimeMillis();		DocumentSet docs = null;		DBBroker broker = null;		try {			broker = pool.get();			if (resource == null) {				docs = parent.collection.allDocs(broker, user, true);			} else {				docs = new DocumentSet();				String id = parent.getName() + '/' + resource;				DocumentImpl doc = parent.collection.getDocument(id);				LOG.debug("updating resource " + doc.getFileName());				docs.add(doc);			}			LOG.debug(xupdate);			XUpdateProcessor processor = new XUpdateProcessor(pool, user, 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();			}            //broker.sync();            LOG.debug("xupdate took " + (System.currentTimeMillis() - start) +            	"ms.");			return mods;		} catch (ParserConfigurationException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(),e);		} catch (IOException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(),e);		} catch (SAXException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(),e);		} catch (PermissionDeniedException e) {			throw new XMLDBException(				ErrorCodes.PERMISSION_DENIED,				e.getMessage());		} catch (EXistException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(),e);		} catch(Exception e) {			e.printStackTrace();			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(),e);		} finally {			pool.release(broker);		}	}