Author: dkuleshov
Date: 2011-11-30 05:16:17 -0500 (Wed, 30 Nov 2011)
New Revision: 5245
Added:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multi-db-schema-support.xml
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml
Log:
EXOJCR-1648: added doc
Added:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multi-db-schema-support.xml
===================================================================
---
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multi-db-schema-support.xml
(rev 0)
+++
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/multi-db-schema-support.xml 2011-11-30
10:16:17 UTC (rev 5245)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="JCR.RESTServicesOnGroovy">
+ <?dbhtml filename="multi-db-schema-support.html"?>
+
+ <title>JBossCache configuration for Multi DB Schema support</title>
+
+ <section>
+ <title>Concepts</title>
+
+ <para>This feature allows us to use the same database instance for several
+ JCR instances just by using different schemas/users. It is possible
+ because database queries are to be launched in the scope of current
+ schema.</para>
+ </section>
+
+ <section>
+ <title>LockManager configuration</title>
+
+ <para>To enable the feature you need to mention
+ org.exoplatform.services.jcr.impl.core.lock.jbosscache.JDBCCacheLoader
+ instead of org.jboss.cache.loader.JDBCCacheLoader in JBossCache
+ configuration file.</para>
+
+ <para>Here is an example of this very part of the configuration:</para>
+
+ <programlisting language="xml"><jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
+
+ <locking useLockStriping="false" concurrencyLevel="500"
lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000" />
+
+ <clustering mode="replication"
clusterName="${jbosscache-cluster-name}">
+ <stateRetrieval timeout="20000"
fetchInMemoryState="false" />
+ <sync />
+ </clustering>
+
+ <loaders passivation="false" shared="true">
+ <!-- All the data of the JCR locks needs to be loaded at startup -->
+ <preload>
+ <node fqn="/" />
+ </preload>
+ <!--
+ For another cache-loader class you should use another template with
+ cache-loader specific parameters
+ -->
+ <loader class=<emphasis
role="bold">"org.exoplatform.services.jcr.impl.core.lock.jbosscache.JDBCCacheLoader"</emphasis>
async="false" fetchPersistentState="false"
+ ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
+ cache.jdbc.table.create=${jbosscache-cl-cache.jdbc.table.create}
+ cache.jdbc.table.drop=${jbosscache-cl-cache.jdbc.table.drop}
+ cache.jdbc.table.primarykey=${jbosscache-cl-cache.jdbc.table.primarykey}
+ cache.jdbc.fqn.column=${jbosscache-cl-cache.jdbc.fqn.column}
+ cache.jdbc.fqn.type=${jbosscache-cl-cache.jdbc.fqn.type}
+ cache.jdbc.node.column=${jbosscache-cl-cache.jdbc.node.column}
+ cache.jdbc.node.type=${jbosscache-cl-cache.jdbc.node.type}
+ cache.jdbc.parent.column=${jbosscache-cl-cache.jdbc.parent.column}
+ cache.jdbc.datasource=${jbosscache-cl-cache.jdbc.datasource}
+ </properties>
+ </loader>
+ </loaders>
+</jbosscache></programlisting>
+
+ <para>You can also obtain file exmaple from <ulink
+
url="http://svn.jboss.org/repos/exo-jcr/jcr/trunk/exo.jcr.component....
+ </section>
+
+ <section>
+ <title>HibernateService configuration</title>
+
+ <para>If you use HibernateService for JDBC connections management you also
+ may specify default schema by setting "hibernate.default_schema" property
+ in the configuration of HibernateService. </para>
+
+ <para>Here is an example:</para>
+
+ <programlisting language="xml"><component>
+
<key>org.exoplatform.services.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ ...........
+ <emphasis role="bold"><property
name="hibernate.default_schema"
value="${gatein.idm.datasource.schema:}"/></emphasis>
+ </properties-param>
+ </init-params>
+</component></programlisting>
+ </section>
+</chapter>
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 2011-11-30
10:09:02 UTC (rev 5244)
+++
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr.xml 2011-11-30
10:16:17 UTC (rev 5245)
@@ -50,7 +50,10 @@
<xi:include href="jcr/configuration/multilanguage-support.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+
+ <xi:include href="jcr/configuration/multi-db-schema-support.xml"
+
xmlns:xi="http://www.w3.org/2001/XInclude" />
+
<xi:include href="jcr/configuration/search-configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />