docXQWS.getUpdateLock().release();
if(docXQWS!=null) { docXQWS.getUpdateLock().release(); }
        private BinaryDocument getXQWS(DBBroker broker, String path) throws PermissionDeniedException        {            XmldbURI pathUri = XmldbURI.create(path);                    BinaryDocument docXQWS = (BinaryDocument) broker.getXMLResource(pathUri, Lock.READ_LOCK);                        //close the XQWS Document and release the read lock            docXQWS.getUpdateLock().release();                        return docXQWS;        }