if(coll != null) coll.release();
	public void chmod(String modeStr) throws XMLDBException {		org.exist.security.SecurityManager manager = pool.getSecurityManager();		if (!collection.checkOwner(user) && !manager.hasAdminPrivileges(user))			throw new XMLDBException(				ErrorCodes.PERMISSION_DENIED,				"you are not the owner of this collection");		org.exist.collections.Collection coll = collection.getCollection();		try {			coll.setPermissions(modeStr);		} catch (SyntaxException e) {			throw new XMLDBException(				ErrorCodes.VENDOR_ERROR,				e.getMessage(),				e);		} catch (LockException e) {			throw new XMLDBException(				ErrorCodes.VENDOR_ERROR,				"Failed to acquire lock on collections.dbx",				e);		}		DBBroker broker = null;		try {			broker = pool.get(user);			broker.saveCollection(coll);			broker.flush();			//broker.sync();		} catch (EXistException e) {			throw new XMLDBException(				ErrorCodes.VENDOR_ERROR,				e.getMessage(),				e);		} catch (PermissionDeniedException e) {			throw new XMLDBException(				ErrorCodes.PERMISSION_DENIED,				e.getMessage(),				e);		} finally {			pool.release(broker);		}	}