How to add MongoDB data source in Orbeon

眉间皱痕 提交于 2019-12-19 10:06:20

问题


How do I add a MongoDB data source to Orbeon CE? I have been browsing through all the xml config files without any luck and the Orbeon documentation doesn't help very much. Any help would be appreciated.

It is supposed to be achievable through the persistence api.

Edit: And when having added the data source \ service under, for example, /fr/service/mongodb/* how do you make procedure calls to it from a form application, i.e. how do you use the /crud and /search to add and retreive information from the database?


回答1:


First note that support for MongoDB is at this point very much experimental. It is implemented as a servlet in MongoDBPersistence.scala, so you'll want to:

  1. Edit Orbeon's web.xml declare that servlet in a <servlet>, and map /fr/service/mongo/* to that servlet with a <servlet-mapping>.
  2. Add a property telling Form Runner to use the MongoDB persistence layer: e.g. <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mongo"/>.
  3. Add a property telling Form Runner what the URI of the MongoDB persistence layer is, e.g. <property as="xs:anyURI" name="oxf.fr.persistence.mongo.uri" value="/fr/service/mongo"/>.


来源:https://stackoverflow.com/questions/14441279/how-to-add-mongodb-data-source-in-orbeon

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!