exo-jcr SVN: r5990 - jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-03-30 02:17:55 -0400 (Fri, 30 Mar 2012)
New Revision: 5990
Modified:
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
Log:
JCR-1727 : set remove synchronized modifier from deleteDocument(int)
Modified: jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
===================================================================
--- jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-30 04:57:56 UTC (rev 5989)
+++ jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-30 06:17:55 UTC (rev 5990)
@@ -216,7 +216,7 @@
+ * {@inheritDoc}
+ */
+ @Override
-+ public synchronized void deleteDocument(int docNum) throws StaleReaderException, CorruptIndexException,
++ public void deleteDocument(int docNum) throws StaleReaderException, CorruptIndexException,
+ LockObtainFailedException, IOException {
+ // skip acquiring write lock
+ if (transientDeletions)
12 years, 1 month
exo-jcr SVN: r5988 - in jcr/branches/1.14.x/patch/1.14.8-GA: JCR-1728 and 1 other directory.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2012-03-29 14:54:05 -0400 (Thu, 29 Mar 2012)
New Revision: 5988
Added:
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1728/
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1728/JCR-1728.patch
Log:
JCR-1728: Patch proposed
Added: jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1728/JCR-1728.patch
===================================================================
--- jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1728/JCR-1728.patch (rev 0)
+++ jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1728/JCR-1728.patch 2012-03-29 18:54:05 UTC (rev 5988)
@@ -0,0 +1,114 @@
+Index: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel.xml
+===================================================================
+--- exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel.xml (revision 5871)
++++ exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel.xml (working copy)
+@@ -6,6 +6,7 @@
+
+ <title>eXoKernel</title>
+
++ <partintro>
+ <para>eXo Kernel is the basis of all eXo platform products and modules.
+ Any component available in eXo Platform is managed by the Exo Container,
+ our micro container responsible for gluing the services through dependency
+@@ -17,7 +18,8 @@
+
+ <para>The Kernel module also contains a set of very low level
+ services.</para>
+-
++ </partintro>
++
+ <xi:include href="kernel/exo-container.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+Index: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq.xml
+===================================================================
+--- exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq.xml (revision 5871)
++++ exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq.xml (working copy)
+@@ -5,8 +5,9 @@
+ <?dbhtml filename="part-faq.html"?>
+
+ <title>Frequently Asked Question</title>
+- <para>This part provides you all FAQs related to the contents mentioned above.</para>
+-
++ <partintro>
++ <para>This part provides you all FAQs related to the contents mentioned above.</para>
++ </partintro>
+ <xi:include href="faq/jcr-faq.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </part>
+Index: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core.xml
+===================================================================
+--- exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core.xml (revision 5871)
++++ exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core.xml (working copy)
+@@ -5,12 +5,12 @@
+ <?dbhtml filename="part-core.html"?>
+
+ <title>eXoCore</title>
+-
++ <partintro>
+ <para>The eXo Core is a set of common services, such as Authentication and Security, Organization, Database, Logging,
+ JNDI, LDAP, Document reader, and other services, that are used by eXo
+ products and modules. It also can be used in the business logic.
+ </para>
+-
++ </partintro>
+ <xi:include href="core/db-creator-service.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+Index: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws.xml
+===================================================================
+--- exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws.xml (revision 5871)
++++ exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws.xml (working copy)
+@@ -6,12 +6,14 @@
+
+ <title>eXoWS</title>
+
+- <para>The Web Services module allows eXo technology to integrate with
+- external products and services.</para>
+-
+- <para>It is implementation of API for RESTful Web Services with extensions,
+- Servlet and cross-domain AJAX web-frameworks and JavaBean-JSON
+- transformer.</para>
++ <partintro>
++ <para>The Web Services module allows eXo technology to integrate with
++ external products and services.</para>
++
++ <para>It is implementation of API for RESTful Web Services with extensions,
++ Servlet and cross-domain AJAX web-frameworks and JavaBean-JSON
++ transformer.</para>
++ </partintro>
+
+ <xi:include href="ws/introduction-to-rest.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+Index: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gatein.xml
+===================================================================
+--- exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gatein.xml (revision 5871)
++++ exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gatein.xml (working copy)
+@@ -5,6 +5,9 @@
+ <?dbhtml filename="part-jcr-with-gatein.html"?>
+
+ <title>eXo JCR with GateIn</title>
++ <partintro>
++ <para>Some information about how eXo JCR works with GateIn.</para>
++ </partintro>
+
+ <xi:include href="jcr-with-gtn/how-to-extend-my-gatein-instance.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+Index: exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml
+===================================================================
+--- exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml (revision 5871)
++++ exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml (working copy)
+@@ -5,9 +5,10 @@
+ <?dbhtml filename="part-jcr.html"?>
+
+ <title>eXoJCR</title>
+- <para>eXo provides JCR implementation called eXo JCR.</para>
+- <para>This part will show you how to configure and use eXo JCR in GateIn and standalone.</para>
+-
++ <partintro>
++ <para>eXo provides JCR implementation called eXo JCR.</para>
++ <para>This part will show you how to configure and use eXo JCR in GateIn and standalone.</para>
++ </partintro>
+ <xi:include href="jcr/intro.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+
12 years, 1 month
exo-jcr SVN: r5987 - jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2012-03-29 13:52:43 -0400 (Thu, 29 Mar 2012)
New Revision: 5987
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gatein.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws.xml
Log:
EXOJCR-1836: The JCR doc is invalid according to the DTD of Docbook 4.5 which prevents the doc of PLF to build
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core.xml 2012-03-29 14:56:11 UTC (rev 5986)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/core.xml 2012-03-29 17:52:43 UTC (rev 5987)
@@ -5,12 +5,12 @@
<?dbhtml filename="part-core.html"?>
<title>eXoCore</title>
-
+ <partintro>
<para>The eXo Core is a set of common services, such as Authentication and Security, Organization, Database, Logging,
JNDI, LDAP, Document reader, and other services, that are used by eXo
products and modules. It also can be used in the business logic.
</para>
-
+ </partintro>
<xi:include href="core/db-creator-service.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq.xml 2012-03-29 14:56:11 UTC (rev 5986)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/faq.xml 2012-03-29 17:52:43 UTC (rev 5987)
@@ -5,8 +5,9 @@
<?dbhtml filename="part-faq.html"?>
<title>Frequently Asked Question</title>
- <para>This part provides you all FAQs related to the contents mentioned above.</para>
-
+ <partintro>
+ <para>This part provides you all FAQs related to the contents mentioned above.</para>
+ </partintro>
<xi:include href="faq/jcr-faq.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</part>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gatein.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gatein.xml 2012-03-29 14:56:11 UTC (rev 5986)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr-with-gatein.xml 2012-03-29 17:52:43 UTC (rev 5987)
@@ -5,6 +5,9 @@
<?dbhtml filename="part-jcr-with-gatein.html"?>
<title>eXo JCR with GateIn</title>
+ <partintro>
+ <para>Some information about how eXo JCR works with GateIn.</para>
+ </partintro>
<xi:include href="jcr-with-gtn/how-to-extend-my-gatein-instance.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml 2012-03-29 14:56:11 UTC (rev 5986)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml 2012-03-29 17:52:43 UTC (rev 5987)
@@ -5,9 +5,10 @@
<?dbhtml filename="part-jcr.html"?>
<title>eXoJCR</title>
- <para>eXo provides JCR implementation called eXo JCR.</para>
- <para>This part will show you how to configure and use eXo JCR in GateIn and standalone.</para>
-
+ <partintro>
+ <para>eXo provides JCR implementation called eXo JCR.</para>
+ <para>This part will show you how to configure and use eXo JCR in GateIn and standalone.</para>
+ </partintro>
<xi:include href="jcr/intro.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel.xml 2012-03-29 14:56:11 UTC (rev 5986)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel.xml 2012-03-29 17:52:43 UTC (rev 5987)
@@ -6,6 +6,7 @@
<title>eXoKernel</title>
+ <partintro>
<para>eXo Kernel is the basis of all eXo platform products and modules.
Any component available in eXo Platform is managed by the Exo Container,
our micro container responsible for gluing the services through dependency
@@ -17,7 +18,8 @@
<para>The Kernel module also contains a set of very low level
services.</para>
-
+ </partintro>
+
<xi:include href="kernel/exo-container.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws.xml 2012-03-29 14:56:11 UTC (rev 5986)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/ws.xml 2012-03-29 17:52:43 UTC (rev 5987)
@@ -6,12 +6,14 @@
<title>eXoWS</title>
- <para>The Web Services module allows eXo technology to integrate with
- external products and services.</para>
-
- <para>It is implementation of API for RESTful Web Services with extensions,
- Servlet and cross-domain AJAX web-frameworks and JavaBean-JSON
- transformer.</para>
+ <partintro>
+ <para>The Web Services module allows eXo technology to integrate with
+ external products and services.</para>
+
+ <para>It is implementation of API for RESTful Web Services with extensions,
+ Servlet and cross-domain AJAX web-frameworks and JavaBean-JSON
+ transformer.</para>
+ </partintro>
<xi:include href="ws/introduction-to-rest.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
12 years, 1 month
exo-jcr SVN: r5986 - jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-03-29 10:56:11 -0400 (Thu, 29 Mar 2012)
New Revision: 5986
Modified:
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
Log:
JCR-1727 : set generics type
Modified: jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
===================================================================
--- jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-29 14:54:01 UTC (rev 5985)
+++ jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-29 14:56:11 UTC (rev 5986)
@@ -204,7 +204,7 @@
modCount = in.getVersion();
+ this.transientDeletions = transientDeletions;
+ // no need to initialize Set if transientDeletions = false
-+ this.deletedDocs = transientDeletions? new CopyOnWriteArraySet() : null;
++ this.deletedDocs = transientDeletions? new CopyOnWriteArraySet<Integer>() : null;
}
//------------------------< FilterIndexReader >-----------------------------
12 years, 1 month
exo-jcr SVN: r5985 - jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-03-29 10:54:01 -0400 (Thu, 29 Mar 2012)
New Revision: 5985
Modified:
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
Log:
JCR-1727 : using Set instead of BitSet
Modified: jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
===================================================================
--- jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-29 11:45:19 UTC (rev 5984)
+++ jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-29 14:54:01 UTC (rev 5985)
@@ -159,21 +159,26 @@
===================================================================
--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CommittableIndexReader.java (revision 5969)
+++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CommittableIndexReader.java (working copy)
-@@ -17,10 +17,13 @@
+@@ -16,12 +16,16 @@
+ */
package org.exoplatform.services.jcr.impl.core.query.lucene;
- import java.io.IOException;
-+import java.util.BitSet;
-
+-import java.io.IOException;
+-
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.FilterIndexReader;
import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.StaleReaderException;
+import org.apache.lucene.store.LockObtainFailedException;
++import java.io.IOException;
++import java.util.Set;
++import java.util.concurrent.CopyOnWriteArraySet;
++
/**
* Wraps an <code>IndexReader</code> and allows to commit changes without
-@@ -36,13 +39,26 @@
+ * closing the reader.
+@@ -36,13 +40,28 @@
private volatile long modCount;
/**
@@ -181,9 +186,9 @@
+ * deleted documents are stored in the memory buffer and not applied to underlying
+ * index reader.
+ */
-+ private boolean transientDeletions;
++ private final boolean transientDeletions;
+
-+ private BitSet deleted;
++ private final Set<Integer> deletedDocs;
+
+ /**
* Creates a new <code>CommittableIndexReader</code> based on <code>in</code>.
@@ -198,73 +203,48 @@
super(in);
modCount = in.getVersion();
+ this.transientDeletions = transientDeletions;
++ // no need to initialize Set if transientDeletions = false
++ this.deletedDocs = transientDeletions? new CopyOnWriteArraySet() : null;
}
//------------------------< FilterIndexReader >-----------------------------
-@@ -57,6 +73,30 @@
+@@ -57,6 +76,36 @@
modCount++;
}
-+ /**
-+ * {@inheritDoc}
-+ */
-+ @Override
-+ public synchronized void deleteDocument(int docNum) throws StaleReaderException, CorruptIndexException,
-+ LockObtainFailedException, IOException
-+ {
-+ // skip acquiring write lock
-+ if (transientDeletions)
-+ {
-+ if (deleted == null)
-+ {
-+ deleted = new BitSet(maxDoc());
-+ }
-+ deleted.set(docNum);
-+ modCount++; // doDelete won't be executed, so incrementing modCount
-+ }
-+ else
-+ {
-+ super.deleteDocument(docNum);
-+ }
++ /**
++ * {@inheritDoc}
++ */
++ @Override
++ public synchronized void deleteDocument(int docNum) throws StaleReaderException, CorruptIndexException,
++ LockObtainFailedException, IOException {
++ // skip acquiring write lock
++ if (transientDeletions)
++ {
++ deletedDocs.add(docNum);
++ modCount++; // doDelete won't be executed, so incrementing modCount
++ }
++ else
++ {
++ super.deleteDocument(docNum);
++ }
++ }
++
++ @Override
++ public boolean isDeleted(int n) {
++ if (transientDeletions)
++ {
++ return deletedDocs.contains(n);
++ }
++ else
++ {
++ return super.isDeleted(n);
++ }
++ }
+
-+ }
-+
//------------------------< additional methods >----------------------------
/**
-@@ -65,4 +105,32 @@
- long getModificationCount() {
- return modCount;
- }
-+
-+ @Override
-+ public boolean isDeleted(int n)
-+ {
-+ if (transientDeletions)
-+ {
-+ if (deleted != null)
-+ {
-+ return deleted.get(n);
-+ }
-+ else
-+ {
-+ return false;
-+ }
-+ }
-+ else
-+ {
-+ return super.isDeleted(n);
-+ }
-+ }
-+
-+ /**
-+ * @return true if reader is readOnly and doesn't apply deletions
-+ */
-+ public boolean isReadOnly()
-+ {
-+ return transientDeletions;
-+ }
- }
Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/PersistentIndex.java
===================================================================
--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/PersistentIndex.java (revision 5969)
12 years, 1 month
exo-jcr SVN: r5984 - parent/trunk.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-03-29 07:45:19 -0400 (Thu, 29 Mar 2012)
New Revision: 5984
Modified:
parent/trunk/pom.xml
Log:
EXOJCR-1834: downgrade maven-surefire-plugin to 2.11
Modified: parent/trunk/pom.xml
===================================================================
--- parent/trunk/pom.xml 2012-03-29 11:13:32 UTC (rev 5983)
+++ parent/trunk/pom.xml 2012-03-29 11:45:19 UTC (rev 5984)
@@ -150,7 +150,7 @@
<version.jibx.plugin>1.2.2</version.jibx.plugin>
<version.javacc.plugin>2.5</version.javacc.plugin>
<version.jaxb2.plugin>0.1</version.jaxb2.plugin>
- <version.surefire.plugin>2.12</version.surefire.plugin>
+ <version.surefire.plugin>2.11</version.surefire.plugin>
</properties>
12 years, 1 month
exo-jcr SVN: r5983 - jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-03-29 07:13:32 -0400 (Thu, 29 Mar 2012)
New Revision: 5983
Modified:
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
Log:
JCR-1727 : avoid reformatting
Modified: jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
===================================================================
--- jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-29 10:19:17 UTC (rev 5982)
+++ jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-29 11:13:32 UTC (rev 5983)
@@ -159,7 +159,7 @@
===================================================================
--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CommittableIndexReader.java (revision 5969)
+++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CommittableIndexReader.java (working copy)
-@@ -17,52 +17,124 @@
+@@ -17,10 +17,13 @@
package org.exoplatform.services.jcr.impl.core.query.lucene;
import java.io.IOException;
@@ -173,89 +173,39 @@
/**
* Wraps an <code>IndexReader</code> and allows to commit changes without
- * closing the reader.
- */
--class CommittableIndexReader extends FilterIndexReader {
-+class CommittableIndexReader extends FilterIndexReader
-+{
+@@ -36,13 +39,26 @@
+ private volatile long modCount;
-- /**
-- * A modification count on this index reader. Initialied with
-- * {@link IndexReader#getVersion()} and incremented with every call to
-- * {@link #doDelete(int)}.
-- */
-- private volatile long modCount;
-+ /**
-+ * A modification count on this index reader. Initialied with
-+ * {@link IndexReader#getVersion()} and incremented with every call to
-+ * {@link #doDelete(int)}.
-+ */
-+ private volatile long modCount;
-
-- /**
-- * Creates a new <code>CommittableIndexReader</code> based on <code>in</code>.
-- *
-- * @param in the <code>IndexReader</code> to wrap.
-- */
+ /**
++ * If reader is created with flag transientDeletions, then reader
++ * deleted documents are stored in the memory buffer and not applied to underlying
++ * index reader.
++ */
++ private boolean transientDeletions;
++
++ private BitSet deleted;
++
++ /**
+ * Creates a new <code>CommittableIndexReader</code> based on <code>in</code>.
+ *
+ * @param in the <code>IndexReader</code> to wrap.
++ * @param transientDeletions If reader is created with flag transientDeletions, then reader
++ * deleted documents are stored in the memory buffer and not applied to underlying
++ * index reader.
+ */
- CommittableIndexReader(IndexReader in) {
-- super(in);
-- modCount = in.getVersion();
-- }
-+ /**
-+ * If reader is created with flag transientDeletions, then reader
-+ * deleted documents are stored in the memory buffer and not applied to underlying
-+ * index reader.
-+ */
-+ private boolean transientDeletions;
++ CommittableIndexReader(IndexReader in, boolean transientDeletions) {
+ super(in);
+ modCount = in.getVersion();
++ this.transientDeletions = transientDeletions;
+ }
-- //------------------------< FilterIndexReader >-----------------------------
-+ private BitSet deleted;
+ //------------------------< FilterIndexReader >-----------------------------
+@@ -57,6 +73,30 @@
+ modCount++;
+ }
-- /**
-- * {@inheritDoc}
-- * <p/>
-- * Increments the modification count.
-- */
-- protected void doDelete(int n) throws CorruptIndexException, IOException {
-- super.doDelete(n);
-- modCount++;
-- }
+ /**
-+ * Creates a new <code>CommittableIndexReader</code> based on <code>in</code>.
-+ *
-+ * @param in the <code>IndexReader</code> to wrap.
-+ * @param transientDeletions If reader is created with flag transientDeletions, then reader
-+ * deleted documents are stored in the memory buffer and not applied to underlying
-+ * index reader.
-+ */
-+ CommittableIndexReader(IndexReader in, boolean transientDeletions)
-+ {
-+ super(in);
-+ modCount = in.getVersion();
-+ this.transientDeletions = transientDeletions;
-+ }
-
-- //------------------------< additional methods >----------------------------
-+ //------------------------< FilterIndexReader >-----------------------------
-
-- /**
-- * @return the modification count of this index reader.
-- */
-- long getModificationCount() {
-- return modCount;
-- }
-+ /**
-+ * {@inheritDoc}
-+ * <p/>
-+ * Increments the modification count.
-+ */
-+ protected void doDelete(int n) throws CorruptIndexException, IOException
-+ {
-+ super.doDelete(n);
-+ modCount++;
-+ }
-+
-+ /**
+ * {@inheritDoc}
+ */
+ @Override
@@ -279,16 +229,14 @@
+
+ }
+
-+ //------------------------< additional methods >----------------------------
+ //------------------------< additional methods >----------------------------
+
+ /**
+@@ -65,4 +105,32 @@
+ long getModificationCount() {
+ return modCount;
+ }
+
-+ /**
-+ * @return the modification count of this index reader.
-+ */
-+ long getModificationCount()
-+ {
-+ return modCount;
-+ }
-+
+ @Override
+ public boolean isDeleted(int n)
+ {
12 years, 1 month
exo-jcr SVN: r5982 - parent/trunk.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-03-29 06:19:17 -0400 (Thu, 29 Mar 2012)
New Revision: 5982
Modified:
parent/trunk/pom.xml
Log:
EXOJCR-1834: upgrade plugin version
Modified: parent/trunk/pom.xml
===================================================================
--- parent/trunk/pom.xml 2012-03-29 09:19:13 UTC (rev 5981)
+++ parent/trunk/pom.xml 2012-03-29 10:19:17 UTC (rev 5982)
@@ -150,7 +150,9 @@
<version.jibx.plugin>1.2.2</version.jibx.plugin>
<version.javacc.plugin>2.5</version.javacc.plugin>
<version.jaxb2.plugin>0.1</version.jaxb2.plugin>
+ <version.surefire.plugin>2.12</version.surefire.plugin>
+
</properties>
<dependencyManagement>
12 years, 1 month
exo-jcr SVN: r5981 - in jcr/branches/1.14.x/patch/1.14.8-GA: JCR-1727 and 1 other directory.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-03-29 05:19:13 -0400 (Thu, 29 Mar 2012)
New Revision: 5981
Added:
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/
jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
Log:
JCR-1727 : proposing a patch
Added: jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch
===================================================================
--- jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch (rev 0)
+++ jcr/branches/1.14.x/patch/1.14.8-GA/JCR-1727/JCR-1727.patch 2012-03-29 09:19:13 UTC (rev 5981)
@@ -0,0 +1,343 @@
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java (revision 5969)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java (working copy)
+@@ -334,7 +334,7 @@
+ }
+ PersistentIndex index =
+ new PersistentIndex(name, handler.getTextAnalyzer(), handler.getSimilarity(), cache, indexingQueue,
+- directoryManager);
++ directoryManager, modeHandler);
+ index.setMaxFieldLength(handler.getMaxFieldLength());
+ index.setUseCompoundFile(handler.getUseCompoundFile());
+ index.setTermInfosIndexDivisor(handler.getTermInfosIndexDivisor());
+@@ -692,7 +692,24 @@
+ for (Iterator<String> it = remove.iterator(); it.hasNext();)
+ {
+ Term idTerm = new Term(FieldNames.UUID, it.next());
+- volatileIndex.removeDocument(idTerm);
++ int num = volatileIndex.removeDocument(idTerm);
++ if (num == 0)
++ {
++ for (int i = indexes.size() - 1; i >= 0; i--)
++ {
++ // only look in registered indexes
++ PersistentIndex idx = indexes.get(i);
++ if (indexNames.contains(idx.getName()))
++ {
++ num = idx.removeDocument(idTerm);
++ if (num > 0)
++ {
++ break;
++ }
++ }
++ }
++ }
++
+ }
+
+ // try to avoid getting index reader for each doc
+@@ -1123,7 +1140,7 @@
+ {
+ index =
+ new PersistentIndex(indexName, handler.getTextAnalyzer(), handler.getSimilarity(), cache, indexingQueue,
+- directoryManager);
++ directoryManager, modeHandler);
+ }
+ catch (IOException e)
+ {
+@@ -3426,7 +3443,7 @@
+ }
+ PersistentIndex index =
+ new PersistentIndex(name, handler.getTextAnalyzer(), handler.getSimilarity(), cache, indexingQueue,
+- directoryManager);
++ directoryManager, modeHandler);
+ index.setMaxFieldLength(handler.getMaxFieldLength());
+ index.setUseCompoundFile(handler.getUseCompoundFile());
+ index.setTermInfosIndexDivisor(handler.getTermInfosIndexDivisor());
+@@ -3527,7 +3544,7 @@
+ }
+ offlineIndex =
+ new OfflinePersistentIndex(handler.getTextAnalyzer(), handler.getSimilarity(), cache, indexingQueue,
+- directoryManager);
++ directoryManager, modeHandler);
+ if (modeHandler.getMode() == IndexerIoMode.READ_WRITE)
+ {
+ flush();
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/OfflinePersistentIndex.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/OfflinePersistentIndex.java (revision 5969)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/OfflinePersistentIndex.java (working copy)
+@@ -22,6 +22,7 @@
+ import org.apache.lucene.document.Document;
+ import org.apache.lucene.index.Term;
+ import org.apache.lucene.search.Similarity;
++import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+ import org.exoplatform.services.jcr.impl.core.query.lucene.directory.DirectoryManager;
+
+ import java.io.IOException;
+@@ -56,9 +57,9 @@
+ * index.
+ */
+ OfflinePersistentIndex(Analyzer analyzer, Similarity similarity, DocNumberCache cache, IndexingQueue indexingQueue,
+- DirectoryManager directoryManager) throws IOException
++ DirectoryManager directoryManager, IndexerIoModeHandler modeHandler) throws IOException
+ {
+- super(NAME, analyzer, similarity, cache, indexingQueue, directoryManager);
++ super(NAME, analyzer, similarity, cache, indexingQueue, directoryManager, modeHandler);
+ this.processedIDs = new ArrayList<String>();
+ }
+
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/AbstractIndex.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/AbstractIndex.java (revision 5969)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/AbstractIndex.java (working copy)
+@@ -25,6 +25,8 @@
+ import org.apache.lucene.index.Term;
+ import org.apache.lucene.search.Similarity;
+ import org.apache.lucene.store.Directory;
++import org.exoplatform.services.jcr.impl.core.query.IndexerIoMode;
++import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+
+@@ -109,6 +111,8 @@
+ */
+ private boolean isExisting;
+
++ protected final IndexerIoModeHandler modeHandler;
++
+ /**
+ * Constructs an index with an <code>analyzer</code> and a
+ * <code>directory</code>.
+@@ -123,13 +127,14 @@
+ * @throws IOException if the index cannot be initialized.
+ */
+ AbstractIndex(final Analyzer analyzer, Similarity similarity, final Directory directory, DocNumberCache cache,
+- IndexingQueue indexingQueue) throws IOException
++ IndexingQueue indexingQueue, IndexerIoModeHandler modeHandler) throws IOException
+ {
+ this.analyzer = analyzer;
+ this.similarity = similarity;
+ this.directory = directory;
+ this.cache = cache;
+ this.indexingQueue = indexingQueue;
++ this.modeHandler = modeHandler;
+
+ AbstractIndex.this.isExisting = IndexReader.indexExists(directory);
+
+@@ -246,7 +251,14 @@
+ if (indexReader == null || !indexReader.isCurrent())
+ {
+ IndexReader reader = IndexReader.open(getDirectory(), null, false, termInfosIndexDivisor);
+- indexReader = new CommittableIndexReader(reader);
++ // if modeHandler != null and mode==READ_ONLY, then reader should be with transient deleteions.
++ // This is used to transiently update reader in clustered environment when some documents have
++ // been deleted. If index reader not null and already contains some transient deletions, but it
++ // is no more current, it will be re-created loosing deletions. They will already be applied by
++ // coordinator node in the cluster. And there is no need to inject them into the new reader
++
++ indexReader =
++ new CommittableIndexReader(reader, modeHandler != null && modeHandler.getMode() == IndexerIoMode.READ_ONLY);
+ }
+ return indexReader;
+ }
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/VolatileIndex.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/VolatileIndex.java (revision 5969)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/VolatileIndex.java (working copy)
+@@ -62,7 +62,7 @@
+ */
+ VolatileIndex(Analyzer analyzer, Similarity similarity, IndexingQueue indexingQueue) throws IOException
+ {
+- super(analyzer, similarity, new RAMDirectory(), null, indexingQueue);
++ super(analyzer, similarity, new RAMDirectory(), null, indexingQueue, null);
+ }
+
+ /**
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CommittableIndexReader.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CommittableIndexReader.java (revision 5969)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/CommittableIndexReader.java (working copy)
+@@ -17,52 +17,124 @@
+ package org.exoplatform.services.jcr.impl.core.query.lucene;
+
+ import java.io.IOException;
++import java.util.BitSet;
+
+ import org.apache.lucene.index.CorruptIndexException;
+ import org.apache.lucene.index.FilterIndexReader;
+ import org.apache.lucene.index.IndexReader;
++import org.apache.lucene.index.StaleReaderException;
++import org.apache.lucene.store.LockObtainFailedException;
+
+ /**
+ * Wraps an <code>IndexReader</code> and allows to commit changes without
+ * closing the reader.
+ */
+-class CommittableIndexReader extends FilterIndexReader {
++class CommittableIndexReader extends FilterIndexReader
++{
+
+- /**
+- * A modification count on this index reader. Initialied with
+- * {@link IndexReader#getVersion()} and incremented with every call to
+- * {@link #doDelete(int)}.
+- */
+- private volatile long modCount;
++ /**
++ * A modification count on this index reader. Initialied with
++ * {@link IndexReader#getVersion()} and incremented with every call to
++ * {@link #doDelete(int)}.
++ */
++ private volatile long modCount;
+
+- /**
+- * Creates a new <code>CommittableIndexReader</code> based on <code>in</code>.
+- *
+- * @param in the <code>IndexReader</code> to wrap.
+- */
+- CommittableIndexReader(IndexReader in) {
+- super(in);
+- modCount = in.getVersion();
+- }
++ /**
++ * If reader is created with flag transientDeletions, then reader
++ * deleted documents are stored in the memory buffer and not applied to underlying
++ * index reader.
++ */
++ private boolean transientDeletions;
+
+- //------------------------< FilterIndexReader >-----------------------------
++ private BitSet deleted;
+
+- /**
+- * {@inheritDoc}
+- * <p/>
+- * Increments the modification count.
+- */
+- protected void doDelete(int n) throws CorruptIndexException, IOException {
+- super.doDelete(n);
+- modCount++;
+- }
++ /**
++ * Creates a new <code>CommittableIndexReader</code> based on <code>in</code>.
++ *
++ * @param in the <code>IndexReader</code> to wrap.
++ * @param transientDeletions If reader is created with flag transientDeletions, then reader
++ * deleted documents are stored in the memory buffer and not applied to underlying
++ * index reader.
++ */
++ CommittableIndexReader(IndexReader in, boolean transientDeletions)
++ {
++ super(in);
++ modCount = in.getVersion();
++ this.transientDeletions = transientDeletions;
++ }
+
+- //------------------------< additional methods >----------------------------
++ //------------------------< FilterIndexReader >-----------------------------
+
+- /**
+- * @return the modification count of this index reader.
+- */
+- long getModificationCount() {
+- return modCount;
+- }
++ /**
++ * {@inheritDoc}
++ * <p/>
++ * Increments the modification count.
++ */
++ protected void doDelete(int n) throws CorruptIndexException, IOException
++ {
++ super.doDelete(n);
++ modCount++;
++ }
++
++ /**
++ * {@inheritDoc}
++ */
++ @Override
++ public synchronized void deleteDocument(int docNum) throws StaleReaderException, CorruptIndexException,
++ LockObtainFailedException, IOException
++ {
++ // skip acquiring write lock
++ if (transientDeletions)
++ {
++ if (deleted == null)
++ {
++ deleted = new BitSet(maxDoc());
++ }
++ deleted.set(docNum);
++ modCount++; // doDelete won't be executed, so incrementing modCount
++ }
++ else
++ {
++ super.deleteDocument(docNum);
++ }
++
++ }
++
++ //------------------------< additional methods >----------------------------
++
++ /**
++ * @return the modification count of this index reader.
++ */
++ long getModificationCount()
++ {
++ return modCount;
++ }
++
++ @Override
++ public boolean isDeleted(int n)
++ {
++ if (transientDeletions)
++ {
++ if (deleted != null)
++ {
++ return deleted.get(n);
++ }
++ else
++ {
++ return false;
++ }
++ }
++ else
++ {
++ return super.isDeleted(n);
++ }
++ }
++
++ /**
++ * @return true if reader is readOnly and doesn't apply deletions
++ */
++ public boolean isReadOnly()
++ {
++ return transientDeletions;
++ }
+ }
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/PersistentIndex.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/PersistentIndex.java (revision 5969)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/PersistentIndex.java (working copy)
+@@ -23,6 +23,7 @@
+ import org.apache.lucene.store.Directory;
+ import org.apache.lucene.store.IndexInput;
+ import org.apache.lucene.store.IndexOutput;
++import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+ import org.exoplatform.services.jcr.impl.core.query.lucene.directory.DirectoryManager;
+
+ import java.io.IOException;
+@@ -56,9 +57,9 @@
+ * index.
+ */
+ PersistentIndex(String name, Analyzer analyzer, Similarity similarity, DocNumberCache cache,
+- IndexingQueue indexingQueue, final DirectoryManager directoryManager) throws IOException
++ IndexingQueue indexingQueue, final DirectoryManager directoryManager, IndexerIoModeHandler modeHandler) throws IOException
+ {
+- super(analyzer, similarity, directoryManager.getDirectory(name), cache, indexingQueue);
++ super(analyzer, similarity, directoryManager.getDirectory(name), cache, indexingQueue, modeHandler);
+ this.name = name;
+ if (isExisting())
+ {
12 years, 1 month
exo-jcr SVN: r5980 - jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-03-28 07:12:31 -0400 (Wed, 28 Mar 2012)
New Revision: 5980
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml
Log:
EXOJCR-1807: updated Workspace Data Container and JDB?\208?\161 Workspace Data Container documentation, removed unnecessary parts.
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2012-03-28 11:02:43 UTC (rev 5979)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2012-03-28 11:12:31 UTC (rev 5980)
@@ -240,61 +240,6 @@
permissions and other users have only a 'read' permission.</para>
</section>
- <section>
- <title>Workspace data container configuration:</title>
-
- <para><emphasis role="bold">class:</emphasis> A workspace data container
- class name.</para>
-
- <para><emphasis role="bold">properties</emphasis>: The list of properties
- (name-value pairs) for the concrete Workspace data container.</para>
-
- <table>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>trigger_events_for_descendents_on_rename</entry>
-
- <entry>indicates if need to trigger events for descendents on
- rename or not. It allows to increase performance on rename
- operation but in same time Observation'll not notified, has
- default value true</entry>
- </row>
-
- <row>
- <entry>lazy-node-iterator-page-size</entry>
-
- <entry>the page size for lazy iterator. Indicates how many nodes
- can be retrieved from storage per request. The default value is
- 100</entry>
- </row>
-
- <row>
- <entry>acl-bloomfilter-false-positive-probability</entry>
-
- <entry>ACL Bloom-filter desired false positive probability. Range
- [0..1]. Default value 0.1d. (See the note below)</entry>
- </row>
-
- <row>
- <entry>acl-bloomfilter-elements-number</entry>
-
- <entry>Expected number of ACL-elements in the Bloom-filter.
- Default value 1000000. (See the note below)</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <note>
- <para>Bloom filters are not supported by all the cache implementations
- so far only the inplementation for infinispan supports it.</para>
- </note>
-
- <para><emphasis role="bold">value-storages</emphasis>: The list of value
- storage plugins.</para>
- </section>
-
<section id="JCR.ConfigurationPersister.ValueStoragePlugin">
<title>Value Storage plugin configuration (for data container):</title>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2012-03-28 11:02:43 UTC (rev 5979)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2012-03-28 11:12:31 UTC (rev 5980)
@@ -7,244 +7,244 @@
<title>JDBC Data Container Config</title>
<para>eXo JCR persistent data container can work in two configuration
- modes:<itemizedlist>
- <listitem>
- <para><phrase>Multi-database</phrase>: One database for each
- workspace (used in standalone eXo JCR service mode)</para>
- </listitem>
+ modes:<itemizedlist>
+ <listitem>
+ <para><phrase>Multi-database</phrase>: One database for each workspace
+ (used in standalone eXo JCR service mode)</para>
+ </listitem>
- <listitem>
- <para><phrase>Single-database</phrase>: All workspaces persisted in
- one database (used in embedded eXo JCR service mode, e.g. in eXo
- portal)</para>
- </listitem>
- </itemizedlist></para>
+ <listitem>
+ <para><phrase>Single-database</phrase>: All workspaces persisted in
+ one database (used in embedded eXo JCR service mode, e.g. in eXo
+ portal)</para>
+ </listitem>
+ </itemizedlist></para>
- <para>The data container uses the JDBC driver to communicate with the
- actual database software, i.e. any JDBC-enabled data storage can be used
- with eXo JCR implementation.</para>
+ <para>The data container uses the JDBC driver to communicate with the actual
+ database software, i.e. any JDBC-enabled data storage can be used with eXo
+ JCR implementation.</para>
- <para>Currently the data container is tested with the following
- configurations:<itemizedlist>
- <listitem>
- <para>MySQL 5.0.18 MYSQL Connector/J 5.0.8</para>
- </listitem>
+ <para>Currently the data container is tested with the following
+ configurations:<itemizedlist>
+ <listitem>
+ <para>MySQL 5.0.18 MYSQL Connector/J 5.0.8</para>
+ </listitem>
- <listitem>
- <para>MySQL 5.1.36 MYSQL Connector/J 5.1.14</para>
- </listitem>
+ <listitem>
+ <para>MySQL 5.1.36 MYSQL Connector/J 5.1.14</para>
+ </listitem>
- <listitem>
- <para>PostgresSQL 8.2.4 JDBC4 Driver, Version 8.2-507</para>
- </listitem>
+ <listitem>
+ <para>PostgresSQL 8.2.4 JDBC4 Driver, Version 8.2-507</para>
+ </listitem>
- <listitem>
- <para>PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-606</para>
- </listitem>
+ <listitem>
+ <para>PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-606</para>
+ </listitem>
- <listitem>
- <para>Oracle DB 10g R2 (10.2.0.4), JDBC Driver Oracle 10g R2
- (10.2.0.4)</para>
- </listitem>
+ <listitem>
+ <para>Oracle DB 10g R2 (10.2.0.4), JDBC Driver Oracle 10g R2
+ (10.2.0.4)</para>
+ </listitem>
- <listitem>
- <para>Oracle DB 11g R1 (11.1.0.6.0), JDBC Driver Oracle 11g R1
- (11.1.0.6.0)</para>
- </listitem>
+ <listitem>
+ <para>Oracle DB 11g R1 (11.1.0.6.0), JDBC Driver Oracle 11g R1
+ (11.1.0.6.0)</para>
+ </listitem>
- <listitem>
- <para>Oracle DB 11g R2 (11.2.0.1.0), JDBC Driver Oracle 11g R2
- (11.2.0.1.0)</para>
- </listitem>
+ <listitem>
+ <para>Oracle DB 11g R2 (11.2.0.1.0), JDBC Driver Oracle 11g R2
+ (11.2.0.1.0)</para>
+ </listitem>
- <listitem>
- <para>DB2 9.7.4 IBM Data Server Driver for JDBC and SQLJ (JCC
- Driver) v.9.7</para>
- </listitem>
+ <listitem>
+ <para>DB2 9.7.4 IBM Data Server Driver for JDBC and SQLJ (JCC Driver)
+ v.9.7</para>
+ </listitem>
- <listitem>
- <para>MS SQL Server 2005 SP3 JDBC Driver 3.0</para>
- </listitem>
+ <listitem>
+ <para>MS SQL Server 2005 SP3 JDBC Driver 3.0</para>
+ </listitem>
- <listitem>
- <para>MS SQL Server 2008 JDBC Driver 3.0</para>
- </listitem>
+ <listitem>
+ <para>MS SQL Server 2008 JDBC Driver 3.0</para>
+ </listitem>
- <listitem>
- <para>Sybase 15.0.3 ASE Driver: Sybase jConnect JDBC driver v7
- (Build 26502)</para>
- </listitem>
+ <listitem>
+ <para>Sybase 15.0.3 ASE Driver: Sybase jConnect JDBC driver v7 (Build
+ 26502)</para>
+ </listitem>
- <listitem>
- <para>HSQLDB (2.0.0)</para>
- </listitem>
- </itemizedlist></para>
+ <listitem>
+ <para>HSQLDB (2.0.0)</para>
+ </listitem>
+ </itemizedlist></para>
- <para>Each database software supports ANSI SQL standards but also has its
- own specifics. So, each database has its own configuration in eXo JCR as a
- database dialect parameter. If you need a more detailed configuration of
- the database, it's possible to do that by editing the metadata SQL-script
- files.</para>
+ <para>Each database software supports ANSI SQL standards but also has its
+ own specifics. So, each database has its own configuration in eXo JCR as a
+ database dialect parameter. If you need a more detailed configuration of the
+ database, it's possible to do that by editing the metadata SQL-script
+ files.</para>
- <para>SQL-scripts you can obtain from jar-file
- exo.jcr.component.core-XXX.XXX.jar:conf/storage/. They also can be found
- at SVN <ulink
- url="https://anonsvn.jboss.org/repos/exo-jcr/jcr/trunk/exo.jcr.component.core/...">here.</ulink></para>
+ <para>SQL-scripts you can obtain from jar-file
+ exo.jcr.component.core-XXX.XXX.jar:conf/storage/. They also can be found at
+ SVN <ulink
+ url="https://anonsvn.jboss.org/repos/exo-jcr/jcr/trunk/exo.jcr.component.core/...">here.</ulink></para>
- <para>In the next two tables correspondence between the scripts and
- databases is shown.</para>
+ <para>In the next two tables correspondence between the scripts and
+ databases is shown.</para>
- <table border="1">
- <caption>Single-database</caption>
+ <table border="1">
+ <caption>Single-database</caption>
- <tr>
- <td>MySQL DB</td>
+ <tr>
+ <td>MySQL DB</td>
- <td>jcr-sjdbc.mysql.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with utf-8</td>
+ <tr>
+ <td>MySQL DB with utf-8</td>
- <td>jcr-sjdbc.mysql-utf8.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql-utf8.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM*</td>
+ <tr>
+ <td>MySQL DB with MyISAM*</td>
- <td>jcr-sjdbc.mysql-myisam.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql-myisam.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM and utf-8*</td>
+ <tr>
+ <td>MySQL DB with MyISAM and utf-8*</td>
- <td>jcr-sjdbc.mysql-myisam-utf8.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql-myisam-utf8.sql</td>
+ </tr>
- <tr>
- <td>PostgresSQL</td>
+ <tr>
+ <td>PostgresSQL</td>
- <td>jcr-sjdbc.pqsql.sql</td>
- </tr>
+ <td>jcr-sjdbc.pqsql.sql</td>
+ </tr>
- <tr>
- <td>Oracle DB</td>
+ <tr>
+ <td>Oracle DB</td>
- <td>jcr-sjdbc.ora.sql</td>
- </tr>
+ <td>jcr-sjdbc.ora.sql</td>
+ </tr>
- <tr>
- <td>DB2</td>
+ <tr>
+ <td>DB2</td>
- <td>jcr-sjdbc.db2.sql</td>
- </tr>
+ <td>jcr-sjdbc.db2.sql</td>
+ </tr>
- <tr>
- <td>MS SQL Server</td>
+ <tr>
+ <td>MS SQL Server</td>
- <td>jcr-sjdbc.mssql.sql</td>
- </tr>
+ <td>jcr-sjdbc.mssql.sql</td>
+ </tr>
- <tr>
- <td>Sybase</td>
+ <tr>
+ <td>Sybase</td>
- <td>jcr-sjdbc.sybase.sql</td>
- </tr>
+ <td>jcr-sjdbc.sybase.sql</td>
+ </tr>
- <tr>
- <td>HSQLDB</td>
+ <tr>
+ <td>HSQLDB</td>
- <td>jcr-sjdbc.sql</td>
- </tr>
- </table>
+ <td>jcr-sjdbc.sql</td>
+ </tr>
+ </table>
- <table border="1">
- <caption>Multi-database</caption>
+ <table border="1">
+ <caption>Multi-database</caption>
- <tr>
- <td>MySQL DB</td>
+ <tr>
+ <td>MySQL DB</td>
- <td>jcr-mjdbc.mysql.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with utf-8</td>
+ <tr>
+ <td>MySQL DB with utf-8</td>
- <td>jcr-mjdbc.mysql-utf8.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql-utf8.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM*</td>
+ <tr>
+ <td>MySQL DB with MyISAM*</td>
- <td>jcr-mjdbc.mysql-myisam.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql-myisam.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM and utf-8*</td>
+ <tr>
+ <td>MySQL DB with MyISAM and utf-8*</td>
- <td>jcr-mjdbc.mysql-myisam-utf8.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql-myisam-utf8.sql</td>
+ </tr>
- <tr>
- <td>PostgresSQL</td>
+ <tr>
+ <td>PostgresSQL</td>
- <td>jcr-mjdbc.pqsql.sql</td>
- </tr>
+ <td>jcr-mjdbc.pqsql.sql</td>
+ </tr>
- <tr>
- <td>Oracle DB</td>
+ <tr>
+ <td>Oracle DB</td>
- <td>jcr-mjdbc.ora.sql</td>
- </tr>
+ <td>jcr-mjdbc.ora.sql</td>
+ </tr>
- <tr>
- <td>DB2</td>
+ <tr>
+ <td>DB2</td>
- <td>jcr-mjdbc.db2.sql</td>
- </tr>
+ <td>jcr-mjdbc.db2.sql</td>
+ </tr>
- <tr>
- <td>MS SQL Server</td>
+ <tr>
+ <td>MS SQL Server</td>
- <td>jcr-mjdbc.mssql.sql</td>
- </tr>
+ <td>jcr-mjdbc.mssql.sql</td>
+ </tr>
- <tr>
- <td>Sybase</td>
+ <tr>
+ <td>Sybase</td>
- <td>jcr-mjdbc.sybase.sql</td>
- </tr>
+ <td>jcr-mjdbc.sybase.sql</td>
+ </tr>
- <tr>
- <td>HSQLDB</td>
+ <tr>
+ <td>HSQLDB</td>
- <td>jcr-mjdbc.sql</td>
- </tr>
- </table>
+ <td>jcr-mjdbc.sql</td>
+ </tr>
+ </table>
- <para>In case the non-ANSI node name is used, it's necessary to use a
- database with MultiLanguage support[TODO link to MultiLanguage]. Some JDBC
- drivers need additional parameters for establishing a Unicode friendly
- connection. E.g. under mysql it's necessary to add an additional parameter
- for the JDBC driver at the end of JDBC URL. For instance:
- <code>jdbc:mysql://exoua.dnsalias.net/portal?characterEncoding=utf8</code></para>
+ <para>In case the non-ANSI node name is used, it's necessary to use a
+ database with MultiLanguage support[TODO link to MultiLanguage]. Some JDBC
+ drivers need additional parameters for establishing a Unicode friendly
+ connection. E.g. under mysql it's necessary to add an additional parameter
+ for the JDBC driver at the end of JDBC URL. For instance:
+ <code>jdbc:mysql://exoua.dnsalias.net/portal?characterEncoding=utf8</code></para>
- <para>There are preconfigured configuration files for HSQLDB. Look for
- these files in /conf/portal and /conf/standalone folders of the jar-file
- <package>exo.jcr.component.core-XXX.XXX.jar</package> or
- source-distribution of eXo JCR implementation.</para>
+ <para>There are preconfigured configuration files for HSQLDB. Look for these
+ files in /conf/portal and /conf/standalone folders of the jar-file
+ <package>exo.jcr.component.core-XXX.XXX.jar</package> or source-distribution
+ of eXo JCR implementation.</para>
- <para>By default, the configuration files are located in service jars
- <filename>/conf/portal/configuration.xml</filename> (eXo services
- including JCR Repository Service) and
- <filename>exo-jcr-config.xml</filename> (repositories configuration). In
- eXo portal product, JCR is configured in portal web application
- <filename>portal/WEB-INF/conf/jcr/jcr-configuration.xml</filename> (JCR
- Repository Service and related serivces) and repository-configuration.xml
- (repositories configuration).</para>
+ <para>By default, the configuration files are located in service jars
+ <filename>/conf/portal/configuration.xml</filename> (eXo services including
+ JCR Repository Service) and <filename>exo-jcr-config.xml</filename>
+ (repositories configuration). In eXo portal product, JCR is configured in
+ portal web application
+ <filename>portal/WEB-INF/conf/jcr/jcr-configuration.xml</filename> (JCR
+ Repository Service and related serivces) and repository-configuration.xml
+ (repositories configuration).</para>
- <para>Read more about <link linkend="JCR.eXoJCRconfiguration">Repository
- configuration</link>.</para>
+ <para>Read more about <link linkend="JCR.eXoJCRconfiguration">Repository
+ configuration</link>.</para>
<section>
<title>General recommendations for database configuration</title>
@@ -410,90 +410,47 @@
</section>
<section>
- <title>Multi-database Configuration</title>
+ <title>Isolated-database Configuration</title>
- <para>You need to configure each workspace in a repository. You may have
- each one on different remote servers as far as you need.</para>
-
- <para>First of all configure the data containers in the
+ <para>Isolated-database configuration allows to configure single database
+ for repository but separate database tables for each workspace. First step
+ is to configure the data container in the
<classname>org.exoplatform.services.naming.InitialContextInitializer</classname>
- service. It's the JNDI context initializer which registers (binds) naming
+ service. It's the JNDI context initializer, which registers (binds) naming
resources (DataSources) for data containers.</para>
- <para>For example (standalone mode, two data containers
- <parameter>jdbcjcr</parameter> - local HSQLDB,
- <parameter>jdbcjcr1</parameter> - remote MySQL):</para>
+ <para>For example:</para>
- <programlisting language="xml"><component>
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- <component-plugins>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
+ <programlisting language="xml"> <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
<properties-param>
<name>ref-addresses</name>
<description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://exoua.dnsalias.net/jcr"/>
+ <property name="driverClassName" value="org.postgresql.Driver"/>
+ <property name="url" value="jdbc:postgresql://exoua.dnsalias.net/portal"/>
<property name="username" value="exoadmin"/>
<property name="password" value="exo12321"/>
- <property name="maxActive" value="50"/>
- <property name="maxIdle" value="5"/>
- <property name="initialSize" value="5"/>
</properties-param>
- </init-params>
- </component-plugin>
- <component-plugins>
- <init-params>
- <value-param>
- <name>default-context-factory</name>
- <value>org.exoplatform.services.naming.SimpleContextFactory</value>
- </value-param>
- </init-params>
- </component>
- </programlisting>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins></programlisting>
<para>We configure the database connection parameters:<itemizedlist>
<listitem>
@@ -517,146 +474,41 @@
</listitem>
</itemizedlist></para>
- <para>There can be connection pool configuration parameters
- (org.apache.commons.dbcp.BasicDataSourceFactory):<itemizedlist>
- <listitem>
- <para><parameter>maxActive</parameter>, e.g. 50</para>
- </listitem>
-
- <listitem>
- <para><parameter>maxIdle</parameter>, e.g. 5</para>
- </listitem>
-
- <listitem>
- <para><parameter>initialSize</parameter>, e.g. 5</para>
- </listitem>
-
- <listitem>
- <para>and other according to <ulink
- url="http://jakarta.apache.org/commons/dbcp/configuration.html">Apache
- DBCP configuration</ulink></para>
- </listitem>
- </itemizedlist></para>
-
<para>When the data container configuration is done, we can configure the
- repository service. Each workspace will be configured for its own data
+ repository service. Each workspace will be configured for the same data
container.</para>
- <para>For example (two workspaces <parameter>ws</parameter> - jdbcjcr,
- <parameter>ws1</parameter> - jdbcjcr1):</para>
+ <para>For example:</para>
<programlisting language="xml"><workspaces>
- <workspace name="ws">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr"/>
- <property name="dialect" value="hsqldb"/>
- <property name="multi-db" value="true"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws"/>
- </properties>
- </container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/><!-- 10Kbytes -->
- <property name="live-time" value="30m"/><!-- 30 min -->
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="jbosscache-shareable" value="true" />
- </properties>
- </lock-manager>
- </workspace>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="db-structure-type" value="isolated" />
+ ...
+ </properties>
+ ...
+ </container>
+ ...
+ </workspace>
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1"/>
- <property name="dialect" value="mysql"/>
- <property name="multi-db" value="true"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws1"/>
- </properties>
- </container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/>
- <property name="live-time" value="5m"/>
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="jbosscache-shareable" value="true" />
- </properties>
- </lock-manager>
- </workspace>
-</workspaces>
-</programlisting>
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="db-structure-type" value="isolated" />
+ ...
+ </properties>
+ ...
+ </container>
+ ...
+ </workspace>
+</workspaces></programlisting>
- <itemizedlist>
- <listitem>
- <para><parameter>source-name</parameter>: A javax.sql.DataSource name
- configured in InitialContextInitializer component (was
- <parameter>sourceName</parameter> prior JCR 1.9);</para>
- </listitem>
-
- <listitem>
- <para><parameter>dialect</parameter>: A database dialect, one of
- "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci",
- "mssql", "sybase", "derby", "db2", "db2v8" or "auto" for dialect
- autodetection;</para>
- </listitem>
-
- <listitem>
- <para><parameter>multi-db</parameter>: Enable multi-database container
- with this parameter (set value "true");</para>
- </listitem>
-
- <listitem>
- <para><parameter>max-buffer-size: A</parameter> a threshold (in bytes)
- after which a javax.jcr.Value content will be swapped to a file in a
- temporary storage. I.e. swap for pending changes.</para>
- </listitem>
-
- <listitem>
- <para><parameter>swap-directory</parameter>: A path in the file system
- used to swap the pending changes.</para>
- </listitem>
- </itemizedlist>
-
<para>In this way, we have configured two workspace which will be
- persisted in two different databases (ws in HSQLDB, ws1 in MySQL).</para>
+ persisted in different database tables.</para>
<note>
<para>Starting from v.1.9 <link
@@ -667,13 +519,129 @@
</section>
<section>
+ <title>Multi-database Configuration</title>
+
+ <note>
+ <para>This configuration option is now deprecated. Use isolated database
+ configuration instead.</para>
+ </note>
+
+ <para>You need to configure each workspace in a repository. You may have
+ each one on different remote servers as far as you need.</para>
+
+ <para>First of all configure the data containers in the
+ <classname>org.exoplatform.services.naming.InitialContextInitializer</classname>
+ service. It's the JNDI context initializer which registers (binds) naming
+ resources (DataSources) for data containers.</para>
+
+ <para>For example:</para>
+
+ <programlisting language="xml"><component>
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ <component-plugins>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+ <property name="url" value="jdbc:mysql://exoua.dnsalias.net/jcr"/>
+ <property name="username" value="exoadmin"/>
+ <property name="password" value="exo12321"/>
+ <property name="maxActive" value="50"/>
+ <property name="maxIdle" value="5"/>
+ <property name="initialSize" value="5"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugins>
+</component>
+ </programlisting>
+
+ <para>When the data container configuration is done, we can configure the
+ repository service. Each workspace will be configured for its own data
+ container.</para>
+
+ <para>For example:</para>
+
+ <programlisting language="xml"><workspaces>
+ <workspace name="ws">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr"/>
+ <property name="db-structure-type" value="multi"/>
+ ...
+ </properties>
+ </container>
+ ...
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1"/>
+ <property name="db-structure-type" value="multi"/>
+ ...
+ </properties>
+ </container>
+ ...
+ </workspace>
+</workspaces> </programlisting>
+
+ <para>In this way, we have configured two workspace which will be
+ persisted in two different databases (ws in HSQLDB, ws1 in MySQL).</para>
+ </section>
+
+ <section>
<title>Single-database configuration</title>
- <para>It's more simple to configure a single-database data container. We
- have to configure one naming resource.</para>
+ <para>It's simplier to configure a single-database data container. We have
+ to configure one naming resource.</para>
- <para>For example (embedded mode for <parameter>jdbcjcr</parameter> data
- container):</para>
+ <para>For example:</para>
<programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
@@ -711,129 +679,37 @@
</programlisting>
<para>And configure repository workspaces in repositories configuration
- with this one database. Parameter "multi-db" must be switched off (set
- value "false").</para>
+ with this one database.</para>
- <para>For example (two workspaces <parameter>ws</parameter> - jdbcjcr,
- <parameter>ws1</parameter> - jdbcjcr):</para>
+ <para>For example:</para>
<programlisting language="xml"><workspaces>
<workspace name="ws">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr"/>
- <property name="dialect" value="pgsql"/>
- <property name="multi-db" value="false"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws"/>
- </properties>
+ <properties>
+ <property name="source-name" value="jdbcjcr"/>
+ <property name="db-structure-type" value="single" />
+ ...
+ </properties>
</container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/>
- <property name="live-time" value="30m"/>
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="../temp/index"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="jbosscache-shareable" value="true" />
- </properties>
- </lock-manager>
+ ...
</workspace>
+
<workspace name="ws1">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr"/>
- <property name="dialect" value="pgsql"/>
- <property name="multi-db" value="false"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws1"/>
+ <property name="db-structure-type" value="single" />
+ ...
</properties>
- </container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/>
- <property name="live-time" value="5m"/>
- </properties>
- </cache>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
- <property name="jbosscache-shareable" value="true" />
- </properties>
- </lock-manager>
+ ...
</workspace>
-</workspaces>
-</programlisting>
+</workspaces></programlisting>
<para>In this way, we have configured two workspaces which will be
persisted in one database (PostgreSQL).</para>
<section>
- <title>Configuration without DataSource</title>
-
- <para>Repository configuration without using of the
- <classname>javax.sql.DataSource</classname> bounded in JNDI.</para>
-
- <para>This case may be usable if you have a dedicated JDBC driver
- implementation with special features like XA transactions,
- statements/connections pooling etc:<itemizedlist>
- <listitem>
- <para>You have to remove the configuration in
- <classname>InitialContextInitializer</classname> for your database
- and configure a new one directly in the workspace
- container.</para>
- </listitem>
-
- <listitem>
- <para>Remove parameter "source-name" and add next lines instead.
- Describe your values for a JDBC driver, database url and
- username.</para>
- </listitem>
- </itemizedlist></para>
-
- <note>
- <para>But be careful in this case JDBC driver should implement and
- provide connection pooling. Connection pooling is very recommended for
- use with JCR to prevent a database overload.</para>
- </note>
-
- <programlisting language="xml"><workspace name="ws">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="dialect" value="hsqldb"/>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal"/>
- <property name="username" value="su"/>
- <property name="password" value=""/>
- ......</programlisting>
- </section>
-
- <section>
<title>Dynamic Workspace Creation</title>
<para>Workspaces can be added dynamically during runtime.</para>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml 2012-03-28 11:02:43 UTC (rev 5979)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml 2012-03-28 11:12:31 UTC (rev 5980)
@@ -26,61 +26,125 @@
<property name="lazy-node-iterator-page-size" value="50"/>
<property name="acl-bloomfilter-false-positive-probability" value="0.1d"/>
<property name="acl-bloomfilter-elements-number" value="1000000"/>
+ <property name="check-sns-new-connection" value="false"/>
</properties></programlisting>
- <para>Properties are Container specific parameters:</para>
+ <para><emphasis role="bold">Workspace Data Container specific
+ parameters:</emphasis></para>
- <para><emphasis role="bold">source-name</emphasis>: JDBC data source name,
- registered in JDNI by InitialContextInitializer. ( <emphasis
- role="bold">sourceName</emphasis> prior v.1.9)</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">max-buffer-size</emphasis>: A threshold in
+ bytes, if a value size is greater, then it will be spooled to a
+ temporary file. Default value is 200k.</para>
+ </listitem>
- <para><emphasis role="bold">dialect</emphasis>: Database dialect, one of
- "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci", "mssql",
- "sybase", "derby", "db2", "db2v8"</para>
+ <listitem>
+ <para><emphasis role="bold">swap-directory</emphasis>: A location where
+ the value will be spooled if no value storage is configured but a
+ max-buffer-size is exceeded. Default value is the value of
+ "java.io.tmpdir" system property.</para>
+ </listitem>
- <para><emphasis role="bold">multi-db</emphasis>: Enable multi-database
- container with this parameter (if "true").</para>
+ <listitem>
+ <para><emphasis role="bold">lazy-node-iterator-page-size</emphasis>:
+ "Lazy" child nodes iterator settings. Defines size of page, the number
+ of nodes that are retrieved from persistent storage at once. Default
+ value is 100.</para>
+ </listitem>
- <para><emphasis role="bold">max-buffer-size</emphasis>: A threshold in
- bytes, if a value size is greater, then it will be spooled to a temporary
- file.</para>
+ <listitem>
+ <para><emphasis
+ role="bold">acl-bloomfilter-false-positive-probability</emphasis>: ACL
+ Bloom-filter settings. ACL Bloom-filter desired false positive
+ probability. Range [0..1]. Default value 0.1d.</para>
+ </listitem>
- <para><emphasis role="bold">swap-directory</emphasis>: A location where the
- value will be spooled if no value storage is configured but a
- max-buffer-size is exceeded.</para>
+ <listitem>
+ <para><emphasis role="bold">acl-bloomfilter-elements-number</emphasis>:
+ ACL Bloom-filter settings. Expected number of ACL-elements in the
+ Bloom-filter. Default value 1000000.</para>
+ </listitem>
- <para><emphasis role="bold">lazy-node-iterator-page-size</emphasis>: "Lazy"
- child nodes iterator settings. Defines size of page, the number of nodes
- that are retrieved from persistent storage at once.</para>
+ <listitem>
+ <para><emphasis role="bold">check-sns-new-connection:</emphasis> Defines
+ if we need to create new connection for checking if an older same-name
+ sibling exists. Default value is "false".</para>
+ </listitem>
+ </itemizedlist>
- <para><emphasis
- role="bold">acl-bloomfilter-false-positive-probability</emphasis>: ACL
- Bloom-filter settings. ACL Bloom-filter desired false positive probability.
- Range [0..1]. Default value 0.1d.</para>
-
- <para><emphasis role="bold">acl-bloomfilter-elements-number</emphasis>: ACL
- Bloom-filter settings. Expected number of ACL-elements in the Bloom-filter.
- Default value 1000000.</para>
-
<note>
<para>Bloom filters are not supported by all the cache implementations so
- far only the inplementation for infinispan supports it.</para>
-
- <para>Bloom-filter used to avoid read nodes that definitely do not have
- ACL. <emphasis
+ far only the inplementation for infinispan supports it. They are used to
+ avoid read nodes that definitely do not have ACL. <emphasis
role="bold">acl-bloomfilter-false-positive-probability</emphasis> and
<emphasis role="bold">acl-bloomfilter-elements-number</emphasis> used to
- configure such filters. Bloom filters are not supported by all the cache
- implementations so far only the inplementation for infinispan supports
- it.</para>
-
- <para>More about Bloom filters you can read here <ulink
- url="http://en.wikipedia.org/wiki/Bloom_filter">http://en.wikipedia.org/wiki/Bloom_filter</ulink>.</para>
+ configure such filters.More about Bloom filters you can read <ulink
+ url="http://en.wikipedia.org/wiki/Bloom_filter" >http://en.wikipedia.org/wiki/Bloom_filter">here</ulink>.</para>
</note>
<para>eXo JCR has an RDB (JDBC) based, production ready <emphasis
role="bold">Workspace Data Container</emphasis>.</para>
+ <para><emphasis role="bold">JDBC Workspace Data Container specific
+ parameters:</emphasis></para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">source-name</emphasis>: JDBC data source
+ name, registered in JDNI by InitialContextInitializer. ( <emphasis
+ role="bold">sourceName</emphasis> prior v.1.9). This property is
+ <emphasis role="bold">mandatory</emphasis>.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">dialect</emphasis>: Database dialect, one of
+ "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci",
+ "mssql", "sybase", "derby", "db2", "db2v8". The default value is
+ "auto".</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">multi-db</emphasis>: Enable multi-database
+ container with this parameter (if "true"). Otherwise (if "false")
+ configured for single-database container. Please, be aware, that this
+ property is currently <emphasis role="bold">deprecated</emphasis>. It is
+ advised to use <emphasis>db-structure-type</emphasis> instead.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">db-structure-type</emphasis>: Can be set to
+ <emphasis>isolated, multi, single</emphasis> to set corresponding
+ configuration for data container. This property is <emphasis
+ role="bold">mandatory.</emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">db-tablename-suffix:</emphasis> If
+ <emphasis>db-structure-type </emphasis>is set to
+ <emphasis>isolated</emphasis>, tables, used by repository service, have
+ the following format:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>JCR_I${db-tablename-suffix} - for items</para>
+ </listitem>
+
+ <listitem>
+ <para>JCR_V${db-tablename-suffix} - for values</para>
+ </listitem>
+
+ <listitem>
+ <para>JCR_R${db-tablename-suffix} - for references</para>
+
+ <para><emphasis>db-tablename-suffix</emphasis> by default equals to
+ workspace name, but can be set via configuration to any
+ suitable.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+
<para>Workspace Data Container MAY support external storages for
javax.jcr.Value (which can be the case for BLOB values for example) using
the optional element <emphasis role="bold">value-storages</emphasis>. Data
12 years, 1 month