Permalink
Browse files

Merge branch 'feature/remove-replication' into develop

  • Loading branch information...
2 parents 17864ab + cccfccd commit d9b4286ef85bc95f8716c70b2ee3e3aea1b47736 @dizzzz dizzzz committed Sep 19, 2013
Showing with 77 additions and 5,174 deletions.
  1. +0 −3 extensions/build.properties
  2. +0 −121 extensions/replication/doc/README.txt
  3. +0 −7 extensions/replication/doc/TODO.txt
  4. +0 −73 extensions/replication/doc/conf.xml
  5. +0 −55 extensions/replication/doc/example.xconf
  6. +0 −15 extensions/replication/extension.xml
  7. +0 −67 extensions/replication/ivy.xml
  8. +0 −16 extensions/replication/ivysettings.xml
  9. +0 −240 extensions/replication/src/org/exist/messaging/JmsMessageReceiver.java
  10. +0 −257 extensions/replication/src/org/exist/messaging/JmsMessageSender.java
  11. +0 −36 extensions/replication/src/org/exist/messaging/MessageReceiver.java
  12. +0 −37 extensions/replication/src/org/exist/messaging/MessageSender.java
  13. +0 −191 extensions/replication/src/org/exist/messaging/MyListener.java
  14. +0 −74 extensions/replication/src/org/exist/messaging/configuration/JmsMessagingConfiguration.java
  15. +0 −40 extensions/replication/src/org/exist/messaging/configuration/MessagingConfiguration.java
  16. +0 −35 extensions/replication/src/org/exist/messaging/configuration/MessagingMetadata.java
  17. +0 −121 extensions/replication/src/org/exist/messaging/configuration/NodeParser.java
  18. +0 −78 extensions/replication/src/org/exist/messaging/xquery/MessagingModule.java
  19. +0 −127 extensions/replication/src/org/exist/messaging/xquery/ReceiveMessage.java
  20. +0 −116 extensions/replication/src/org/exist/messaging/xquery/SendMessage.java
  21. +0 −273 extensions/replication/src/org/exist/replication/jms/obsolete/FileSystemListener.java
  22. +0 −83 extensions/replication/src/org/exist/replication/jms/obsolete/ResourceReplicator.java
  23. +0 −83 extensions/replication/src/org/exist/replication/jms/obsolete/Sender.java
  24. +0 −229 extensions/replication/src/org/exist/replication/jms/publish/JMSMessageSender.java
  25. +0 −141 extensions/replication/src/org/exist/replication/jms/publish/PublisherParameters.java
  26. +0 −447 extensions/replication/src/org/exist/replication/jms/publish/ReplicationTrigger.java
  27. +0 −957 extensions/replication/src/org/exist/replication/jms/subscribe/JMSMessageListener.java
  28. +0 −47 extensions/replication/src/org/exist/replication/jms/subscribe/MessageReceiveException.java
  29. +0 −182 extensions/replication/src/org/exist/replication/jms/subscribe/MessageReceiverStartupTrigger.java
  30. +0 −197 extensions/replication/src/org/exist/replication/jms/subscribe/SubscriberParameters.java
  31. +0 −33 extensions/replication/src/org/exist/replication/shared/ClientParameterException.java
  32. +0 −194 extensions/replication/src/org/exist/replication/shared/ClientParameters.java
  33. +0 −58 extensions/replication/src/org/exist/replication/shared/JmsConnectionExceptionListener.java
  34. +0 −55 extensions/replication/src/org/exist/replication/shared/JmsConnectionHelper.java
  35. +0 −175 extensions/replication/src/org/exist/replication/shared/MessageHelper.java
  36. +0 −39 extensions/replication/src/org/exist/replication/shared/MessageSender.java
  37. +0 −46 extensions/replication/src/org/exist/replication/shared/TransportException.java
  38. +0 −198 extensions/replication/src/org/exist/replication/shared/eXistMessage.java
  39. +56 −17 nbproject/build-impl.xml
  40. +2 −2 nbproject/genfiles.properties
  41. +15 −8 nbproject/project.properties
  42. +4 −1 nbproject/project.xml
@@ -51,9 +51,6 @@ include.feature.metadata.sleepycat = false
# via REST
include.feature.netedit = false
-# Clustering extension for reliable document replication
-include.feature.replication = false
-
# Security ActiveDirectory extension for eXist (requires LDAP extension)
include.feature.security.activedirectory = false
@@ -1,121 +0,0 @@
-$Id$
-
-This document provides a short introduction on the document replication function
-of eXist-db.
-
- "You want to configure two or more eXist instances to work together to
- automatically synchronize collection-specific data sets. This allows you
- to scale your eXist server capacity. For example, with multiple eXist servers
- configured to stay in sync as described below, you could add a load-balancer
- to distribute the load of incoming queries across the pool of servers
- and still maintain high performance."
-
- Quoted from http://en.wikibooks.org/wiki/XQuery/eXist_Clustering
-
-Fortunately the steps are not too complex.
-
-
-Preparation
-===========
-
-ActimeMQ
---------
-- Download recent version from ActiveMQ from http://activemq.apache.org/download.html ;
- Note that the TGZ file has additional unix (linux, MacOsX) support, the ZIP file
- is for Windows. The contents of the archives actually differ.
-- Extract content to disk, refered as ACTIVEMQ_HOME
-- Copy the activemq-all-X.Y.Z.jar file to EXIST_HOME/lib/user
-
-eXistdb
--------
-- Build replication extension (modify extensions/local.build.properties) or copy the
- pre-built version of exist-replication.jar to lib/extensions
-
-
-
-Get Started
-===========
-- For 'Master' server (publisher)
- - Create collection '/db/mycollection/' that shall be monitored for document changes
- - Create collection '/db/system/config/db/mycollection/'
- - Create in there a document 'collection.xconf' and add the following content to
- the document:
-
- <collection xmlns="http://exist-db.org/collection-config/1.0">
- <triggers>
- <trigger class="org.exist.replication.jms.publish.ReplicationTrigger">
-
- <parameter name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
- <parameter name="java.naming.provider.url" value="tcp://myserver.local:61616"/>
-
- <parameter name="connectionfactory" value="ConnectionFactory"/>
- <parameter name="topic" value="dynamicTopics/eXistdb"/>
-
- <!-- Set value -->
- <parameter name="client-id" value="SetPublisherId"/>
-
- </trigger>
- </triggers>
- </collection>
-
- - Set the correct value for 'java.naming.provider.url' that matches your message broker
- - Set a unique value for the "client-id" parameter.
-
-
-- For each 'Slave' (subscriber)
- - Add a startup trigger to conf.xml:
-
- <trigger class="org.exist.replication.jms.subscribe.MessageReceiverStartupTrigger">>
-
- <parameter name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
- <parameter name="java.naming.provider.url" value="tcp://myserver.local:61616"/>
-
- <parameter name="connectionfactory" value="ConnectionFactory"/>
- <parameter name="topic" value="dynamicTopics/eXistdb"/>
-
- <!-- set values -->
- <parameter name="client-id" value="SetSubscriberId"/>
- <parameter name="subscriber-name" value="SetSubscriptionId"/>
-
- </trigger>
-
- - Set the correct value for 'java.naming.provider.url' that matches your message broker
- - Set unique values for "client-id" and 'subscriber-name'
-
- - Create the collection '/db/mycollection/' , this is the collection that receives the
- documents that are updated in the same collection on the 'Master' server.
-
-
-
-
-Start-up
---------
-- Start ActiveMQ server:
- cd ACTIVEMQ_HOME
- ./bin/activemq start [for mac, use the bin/macosx wrapper directory]
-
-- Start Slave
- cd EXISTSLAVE_HOME
- ./bin/startup.sh
-
-- Start Master
- cd EXISTMASTER_HOME
- ./bin/startup.sh
-
-
-Distribute
-----------
-- Create a document in the master server in '/db/mycollection/' (e.g. using the
- java client or eXide; login as admin); The document will be automatically
- replicated to the slave servers.
-
-
-Performance Test
-----------------
-- With eXide upload a +- 50k XML document store as /db/mydoc.xml
- Execute the query, check the timing on the slave (see exist.log)
-
- let $doc := doc('/db/mydoc.xml')
- for $i in (1000 to 3000)
- return
- xmldb:store('/db/mycollection', concat('mydoc', $i , ".xml"), $doc)
@@ -1,7 +0,0 @@
-ToDo's
-
-- handle exceptions, stop initialization and report if needed
-- require Topic as destination, else fail
-
-- prevent infinite loop if node is sender and receiver
- - switch - off triggers when writing documents.
@@ -1,73 +0,0 @@
-<!--
- Start JMS listener for listener of the clustering feature.
--->
-<trigger
- class="org.exist.replication.jms.subscribe.MessageReceiverStartupTrigger">
- <!--
- Class name of the initial context provider, default value for ActiveMQ
- see javax.naming.Context#INITIAL_CONTEXT_FACTORY
- -->
- <parameter name="java.naming.factory.initial"
- value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-
- <!--
- URL of the message broker, default value for ActiveMQ
- see javax.naming.Context#PROVIDER_URL
- -->
- <parameter name="java.naming.provider.url"
- value="tcp://myserver.local:61616"/>
-
- <!--
- Lookup connection factory
- see javax.naming.InitialContext#lookup(String)
- -->
- <parameter name="connectionfactory" value="ConnectionFactory"/>
-
- <!--
- Lookup destination (topic)
- see javax.naming.InitialContext#lookup(String)
- -->
- <parameter name="topic" value="dynamicTopics/eXistdb"/>
-
- <!--
- Set client identifier for this connection. Required for durable
- subscriptions (default setting)
- see javax.jms.Connection#setClientID(string)
- -->
- <parameter name="client-id" value="SubscriberId"/>
-
- <!--
- Set the name used to identify this subscription
- see JMS javax.jms.TopicSession#createDurableSubscriber(Topic,String)
- -->
- <parameter name="subscriber-name" value="SubscriptionId"/>
-
- <!--
- Set the subscription is durable. default = yes
- see JMS javax.jms.Session#createDurableSubscriber(Topic,String)
- see JMS javax.jms.Session#createConsumer(Destination, String, boolean)
-
- [Optional]
- -->
- <!--<parameter name="durable" value="yes"/>-->
-
- <!--
- A JMS API message selector allows a message consumer to specify
- the messages it is interested in. The syntax of the expression is based
- on a subset of the SQL92 conditional expression syntax.
-
- see javax.jms.Message
-
- [Optional]
- -->
- <!--<parameter name="messageselector"
- value="property1 = 'a' OR property2 = 'b'"/>-->
-
- <!--
- If set, inhibits delivery of messages published by its own connection
- default = yes
-
- [Optional]
- -->
- <!--<parameter name="nolocal" value="yes"/>-->
-</trigger>
@@ -1,55 +0,0 @@
-<collection xmlns="http://exist-db.org/collection-config/1.0">
- <triggers>
- <trigger class="org.exist.replication.jms.publish.ReplicationTrigger">
-
- <!--
- Class name of the initial context provider, default value for ActiveMQ
- see javax.naming.Context#INITIAL_CONTEXT_FACTORY
- -->
- <parameter name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-
- <!--
- URL of the message broker, default value for ActiveMQ
- see javax.naming.Context#PROVIDER_URL
- -->
- <parameter name="java.naming.provider.url" value="tcp://myserver.local:61616"/>
-
- <!--
- Lookup connection factory
- see javax.naming.InitialContext#lookup(String)
- -->
- <parameter name="connectionfactory" value="ConnectionFactory"/>
-
- <!--
- Lookup destination (topic)
- see javax.naming.InitialContext#lookup(String)
- -->
- <parameter name="topic" value="dynamicTopics/eXistdb"/>
-
- <!--
- Set client identifier for this connection.
- see javax.jms.Connection#setClientID(string)
-
- [Optional]
- -->
- <!-- <parameter name="client-id" value="PublisherId"/> -->
-
- <!--
- Set time-to-live in milliseconds, default value is 0 (unlimited)
- see javax.jms.MessageProducer#setTimeToLive(long)
-
- [Optional]
- -->
- <!-- <parameter name="time-to-live" value="0"/> -->
-
- <!--
- Sets the producer priority, value 0-9 ; default is 4.
- see javax.jms.MessageProducer#setPriority(int)
-
- [Optional]
- -->
- <!-- <parameter name="priority" value="4"/>-->
-
- </trigger>
- </triggers>
-</collection>
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project basedir="." default="all" name="replication">
-
- <property file="../local.build.properties"/>
- <property file="../build.properties"/>
-
- <property name="extension.name" value="${ant.project.name}"/>
- <property name="existhome.dir" location="../.."/>
-
- <property name="extension.include" value="${include.feature.replication}"/>
-
- <!-- import common.xml here -->
- <import file="${existhome.dir}/build/scripts/extensions-common.xml"/>
-
-</project>
@@ -1,67 +0,0 @@
-<!--
- Ivy module to retrieve the tika jar, including dependancies, excluding duplicate jars
-
- $Id$
--->
-<ivy-module version="2.0">
- <info organisation="org.exist" module="replication"/>
- <dependencies>
-
- <dependency org="org.apache.activemq" name="activemq-all" rev="5.8.0" conf="*->*,!sources,!javadoc">
- <exclude module="slf4j-api"/>
-
- <!--
- Remove the following excludes to enable the new AMQP support
- http://www.amqp.org
- http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol
- -->
- <exclude module="proton-jms"/>
- <exclude module="hawtbuf"/>
- <exclude module="activemq-amqp"/>
- </dependency>
-
- <!-- Please leave here -->
- <!-- <dependency org="org.apache.activemq" name="activemq-core" rev="5.6.0" conf="*->*,!sources,!javadoc">
-
- <exclude module="slf4j-api"/>
- <exclude module="commons-logging"/>
- <exclude module="kahadb"/>
- <exclude module="org.osgi.core"/>
- <exclude module="spring-context"/>
- <exclude module="commons-net"/>
- <exclude module="jasypt"/>
-
-
- <exclude module="activemq-openwire-generator"/>
- <exclude module="activemq-protobuf"/>
- <exclude module="activemq-jmdns_1.0"/>
- <exclude module="activemq-jaas"/>
- <exclude module="geronimo-jta_1.0.1B_spec"/>
-
-
- <exclude module="groovy-all"/>
-
-
- <exclude module="xbean-spring"/>
- <exclude module="spring-aop"/>
- <exclude module="commons-logging"/>
-
- <exclude module="commons-pool"/>
- <exclude module="xalan"/>
- <exclude module="ant"/>
- <exclude module="xpp3_min"/>
- <exclude module="derby"/>
-
- <exclude module="aopalliance"/>
-
- <exclude module="xstream"/>
- <exclude module="stax-api"/>
- <exclude module="gram"/>
- <exclude module="jettison"/>
- <exclude module="geronimo-jacc_1.1_spec"/>
- <exclude module="geronimo-annotation_1.0_spec"/>
-
- </dependency>-->
-
- </dependencies>
-</ivy-module>
@@ -1,16 +0,0 @@
-<ivysettings>
- <properties file="build.properties" />
- <settings defaultResolver="local-chain"/>
- <resolvers>
- <ibiblio name="ibiblio-maven2" m2compatible="true"/>
- <ibiblio name="java-net-maven2" root="http://download.java.net/maven/2/" m2compatible="true" />
- <ibiblio name="maven" root="http://mvnrepository.com/artifact/" m2compatible="true" />
- <ibiblio name="fuse" root="http://repo.fusesource.com/nexus/content/groups/public/" m2compatible="true" />
- <chain name="local-chain">
- <resolver ref="maven"/>
- <resolver ref="ibiblio-maven2"/>
- <resolver ref="java-net-maven2"/>
- <resolver ref="fuse"/>
- </chain>
- </resolvers>
-</ivysettings>
Oops, something went wrong.

0 comments on commit d9b4286

Please sign in to comment.