Permalink
Browse files

Merge branch 'develop' of github.com:eXist-db/exist into develop

  • Loading branch information...
2 parents 4120837 + 8e6a423 commit 44f16659c39f4c6bc1a0ead02135ea434eb034dc @wolfgangmm wolfgangmm committed Sep 23, 2013
Showing with 84 additions and 5,181 deletions.
  1. +2 −5 build/scripts/dist.xml
  2. +0 −3 extensions/build.properties
  3. +3 −1 extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneMatchListener.java
  4. +2 −1 extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneUtil.java
  5. +0 −121 extensions/replication/doc/README.txt
  6. +0 −7 extensions/replication/doc/TODO.txt
  7. +0 −73 extensions/replication/doc/conf.xml
  8. +0 −55 extensions/replication/doc/example.xconf
  9. +0 −15 extensions/replication/extension.xml
  10. +0 −67 extensions/replication/ivy.xml
  11. +0 −16 extensions/replication/ivysettings.xml
  12. +0 −240 extensions/replication/src/org/exist/messaging/JmsMessageReceiver.java
  13. +0 −257 extensions/replication/src/org/exist/messaging/JmsMessageSender.java
  14. +0 −36 extensions/replication/src/org/exist/messaging/MessageReceiver.java
  15. +0 −37 extensions/replication/src/org/exist/messaging/MessageSender.java
  16. +0 −191 extensions/replication/src/org/exist/messaging/MyListener.java
  17. +0 −74 extensions/replication/src/org/exist/messaging/configuration/JmsMessagingConfiguration.java
  18. +0 −40 extensions/replication/src/org/exist/messaging/configuration/MessagingConfiguration.java
  19. +0 −35 extensions/replication/src/org/exist/messaging/configuration/MessagingMetadata.java
  20. +0 −121 extensions/replication/src/org/exist/messaging/configuration/NodeParser.java
  21. +0 −78 extensions/replication/src/org/exist/messaging/xquery/MessagingModule.java
  22. +0 −127 extensions/replication/src/org/exist/messaging/xquery/ReceiveMessage.java
  23. +0 −116 extensions/replication/src/org/exist/messaging/xquery/SendMessage.java
  24. +0 −273 extensions/replication/src/org/exist/replication/jms/obsolete/FileSystemListener.java
  25. +0 −83 extensions/replication/src/org/exist/replication/jms/obsolete/ResourceReplicator.java
  26. +0 −83 extensions/replication/src/org/exist/replication/jms/obsolete/Sender.java
  27. +0 −229 extensions/replication/src/org/exist/replication/jms/publish/JMSMessageSender.java
  28. +0 −141 extensions/replication/src/org/exist/replication/jms/publish/PublisherParameters.java
  29. +0 −447 extensions/replication/src/org/exist/replication/jms/publish/ReplicationTrigger.java
  30. +0 −957 extensions/replication/src/org/exist/replication/jms/subscribe/JMSMessageListener.java
  31. +0 −47 extensions/replication/src/org/exist/replication/jms/subscribe/MessageReceiveException.java
  32. +0 −182 extensions/replication/src/org/exist/replication/jms/subscribe/MessageReceiverStartupTrigger.java
  33. +0 −197 extensions/replication/src/org/exist/replication/jms/subscribe/SubscriberParameters.java
  34. +0 −33 extensions/replication/src/org/exist/replication/shared/ClientParameterException.java
  35. +0 −194 extensions/replication/src/org/exist/replication/shared/ClientParameters.java
  36. +0 −58 extensions/replication/src/org/exist/replication/shared/JmsConnectionExceptionListener.java
  37. +0 −55 extensions/replication/src/org/exist/replication/shared/JmsConnectionHelper.java
  38. +0 −175 extensions/replication/src/org/exist/replication/shared/MessageHelper.java
  39. +0 −39 extensions/replication/src/org/exist/replication/shared/MessageSender.java
  40. +0 −46 extensions/replication/src/org/exist/replication/shared/TransportException.java
  41. +0 −198 extensions/replication/src/org/exist/replication/shared/eXistMessage.java
  42. +56 −17 nbproject/build-impl.xml
  43. +2 −2 nbproject/genfiles.properties
  44. +15 −8 nbproject/project.properties
  45. +4 −1 nbproject/project.xml
@@ -64,7 +64,7 @@
<include name="*.jar"/>
</lib>
<!-- Include spatial jars, when available -->
- <lib dir="extensions/indexes/spatial/lib">
+ <lib dir="extensions/indexes/spatial/lib" erroronmissingdir="false">
<include name="*.jar"/>
</lib>
<!-- Include xqdoc jar, needed for xquery function documentation -->
@@ -133,10 +133,7 @@
<exclude name="WEB-INF/expathrepo/**"/>
<exclude name="**/*.log*"/>
</fileset>
- <!-- Betterform -->
- <zipfileset dir="extensions/betterform/main/xrx/" prefix="betterform/samples/xrx">
- <include name="**/*"/>
- </zipfileset>
+
<zipfileset dir="samples" prefix="samples">
<include name="**"/>
<exclude name="**/*~"/>
@@ -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,6 +1,6 @@
/*
* eXist Open Source Native XML Database
- * Copyright (C) 2008-2012 The eXist-db Project
+ * Copyright (C) 2008-2013 The eXist-db Project
* http://exist-db.org
*
* This program is free software; you can redistribute it and/or
@@ -326,6 +326,8 @@ private void getTerms() {
LuceneUtil.extractTerms(query, termMap, reader, false);
} catch (IOException e) {
LOG.warn("Error while highlighting lucene query matches: " + e.getMessage(), e);
+ } catch (UnsupportedOperationException uoe) {
+ LOG.warn("Error while highlighting lucene query matches: " + uoe.getMessage(), uoe);
} finally {
index.releaseReader(reader);
}
@@ -105,8 +105,9 @@ public static QName decodeQName(String s, SymbolTable symbols) {
* @param query
* @param terms
* @throws IOException in case of an error
+ * @throws UnsupportedOperationException in case of an error
*/
- public static void extractTerms(Query query, Map<Object, Query> terms, IndexReader reader, boolean includeFields) throws IOException {
+ public static void extractTerms(Query query, Map<Object, Query> terms, IndexReader reader, boolean includeFields) throws IOException, UnsupportedOperationException {
if (query instanceof BooleanQuery)
extractTermsFromBoolean((BooleanQuery)query, terms, reader, includeFields);
else if (query instanceof TermQuery)
@@ -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>
Oops, something went wrong.

0 comments on commit 44f1665

Please sign in to comment.