brokerPool.release(broker);
pool.release(broker);
	public Node getContentAsDOM() throws XMLDBException {		if (root != null)			return root;		else if (value != null) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR,					"cannot return an atomic value as DOM node");		} else {		    DocumentImpl document = null;			DBBroker broker = null;			try {				broker = brokerPool.get(user);				document = getDocument(broker, true);				if (!document.getPermissions().validate(user, Permission.READ))					throw new XMLDBException(ErrorCodes.PERMISSION_DENIED,							"permission denied to read resource");				if (id < 0)					return document.getDocumentElement();				else if (proxy != null)					return document.getNode(proxy);				else					return document.getNode(id);			} catch (EXistException e) {				throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e						.getMessage(), e);			} finally {			    parent.getCollection().releaseDocument(document);				brokerPool.release(broker);			}		}	}