简体   繁体   English

exist-db restxq触发器:服务已删除但仍处于活动状态

[英]exist-db restxq trigger : Services deleted but still active

I have issues with the RESTXQ implementation in exist-db. 我在exist-db中使用RESTXQ实现时遇到问题。 I think it might be the RestXQTrigger which is not working correctly. 我认为可能是RestXQTrigger无法正常工作。

The problem: I deleted (via the Dashboard) a collection including RESTXQ services inside several .xqm files. 问题:我(通过仪表板)删除了一个集合,该集合包括几个.xqm文件中的RESTXQ服务。 However, the services are not unregistered and are still available, even after restarting eXist. 但是,即使重新启动eXist,服务也不会取消注册并仍然可用。

Is there any way to force this unregistring, I mean other than recreate the previous collections/files and delete each .xqm files one by one (this way, the trigger seems to work) ? 有什么方法可以强制取消注册,我的意思是除了重新创建以前的集合/文件并.xqm删除每个.xqm文件(这样,触发器似乎可以工作)?

RESTXQ in eXist at the moment only implements the Document Trigger events and not the Collection Trigger events. 目前,eXist中的RESTXQ仅实现文档触发事件,而不实现集合触发事件。 This is just a limitation which needs to be resolved when there is time to implement it. 这只是一个限制,在有时间实施时需要解决。

There is an XQuery module provided with eXist in the namespace: http://exquery.org/ns/restxq/exist . eXist在名称空间中提供了一个XQuery模块: http://exquery.org/ns/restxq/exist : http://exquery.org/ns/restxq/exist The functions in this module enable you to manually manipulate the RESTXQ Registry. 该模块中的功能使您可以手动操作RESTXQ注册表。 You can enable it in $EXIST_HOME/conf.xml . 您可以在$EXIST_HOME/conf.xml启用它。 If you then restart eXist and re-build the function documentation you should be able to see the documentation in the function browser app for these functions. 如果随后重新启动eXist并重建功能文档,则应该能够在功能浏览器应用程序中查看这些功能的文档。 In particular you most likely want the functions: 特别是您最可能需要以下功能:

exrest:deregister-module(xs:anyURI("/db/my-module.xqm")) and exrest:register-module(xs:anyURI("/db/my-module.xqm")) . exrest:deregister-module(xs:anyURI("/db/my-module.xqm"))exrest:register-module(xs:anyURI("/db/my-module.xqm"))

There are also functions for registering and deregistering individual functions from a module, which are called register-resource-function and deregister-resource-function they are similar to above but take a second argument which is a function signature (as a xs:string) in the form of qname#arity eg "fn:substring#2" 还有一些用于注册和注销模块中各个功能的函数,分别称为register-resource-functionderegister-resource-function它们与上面类似,但带有第二个参数,它是一个函数签名(如xs:string)以qname#arity的形式表示,例如"fn:substring#2"

您可以停止数据库,然后手动删除注册表文件$EXIST_HOME/webapp/WEBINF/data/restxq.registry

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM