Skip to content

Document replication: quick test

Dannes Wessels edited this page May 14, 2014 · 1 revision
  • Setup an ActiveMQ server
  • download distribution from http://activemq.apache.org/download.html: The ZIP file for Windows, the TGZ for Unix.
  • start server (for testing purposes almost no configuration changes required)
  • Setup and configure one or more 'consumer' eXist-db instances
  • modify conf.xml as hinted
  • create collection /db/replicated
  • start servers
  • Setup one 'master' eXist-db instance
  • start server
  • start eXide
  • create the collection /db/replicated
  • create a collection.xconf' file, store it in /db/replicated`. eXide asks if the file needs to be processed. Please do.
  • Test document creation replication
    • execute the following query.
    • verify the 'consumer' instances, each instance should contain 10 documents in /db/replicated
let $doc := <doc>just some data</doc>
for $i in (1000 to 1010)
return
    xmldb:store('/db/replicated', concat('mydoc', $i , ".xml"), $doc)
  • Test document removal replication
  • execute the following query.
  • verify the 'consumer' instances, each instance should contain 0 documents in /db/replicated
for $i in (1000 to 1010)
return
    xmldb:remove('/db/replicated/', concat('mydoc', $i , ".xml"))
Clone this wiki locally