[exo-jcr-commits] exo-jcr SVN: r5588 - in jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr: ispn and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Feb 8 10:48:52 EST 2012
Author: tolusha
Date: 2012-02-08 10:48:52 -0500 (Wed, 08 Feb 2012)
New Revision: 5588
Modified:
jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/ispn/ispn-integration.xml
Log:
EXOJCR-1735: ISPN integration chapter
Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2012-02-08 15:46:49 UTC (rev 5587)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2012-02-08 15:48:52 UTC (rev 5588)
@@ -1,39 +1,54 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This document was created with Syntext Serna Free. --><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="JCR.ClusterConfig">
-<?dbhtml filename="ch-cluster-config.html"?> <title>Configuring JBoss AS with eXo JCR in cluster</title>
+ <?dbhtml filename="ch-cluster-config.html"?>
+
+ <title>Configuring JBoss AS with eXo JCR in cluster</title>
+
<section>
<title>Launching Cluster</title>
+
<section>
<title>Deploying eXo JCR to JBoss As</title>
+
<para>To deploy eXo JCR to JBoss, do the following steps:</para>
+
<orderedlist>
<listitem>
- <para>Download the latest version of eXo JCR .ear file distribution.</para>
+ <para>Download the latest version of eXo JCR .ear file
+ distribution.</para>
</listitem>
+
<listitem>
<para>Copy <jcr.ear> into
<%jboss_home%/server/default/deploy></para>
</listitem>
+
<listitem>
<para>Put exo-configuration.xml to the root
<%jboss_home%/exo-configuration.xml></para>
</listitem>
+
<listitem>
<para>Configure JAAS by inserting XML fragment shown below into
<%jboss_home%/server/default/conf/login-config.xml></para>
-
- <programlisting language="xml"><application-policy name="exo-domain">
+
+ <programlisting language="xml"><application-policy name="exo-domain">
<authentication>
- <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
</authentication>
</application-policy></programlisting>
</listitem>
+
<listitem>
- <para>Ensure that you use JBossTS <link linkend="Kernel.TransactionService">Transaction Service</link> and
- JBossCache <link linkend="JCR.JBossTransactionsService">Transaction Manager</link>. Your exo-configuration.xml must contain such
+ <para>Ensure that you use JBossTS <link
+ linkend="Kernel.TransactionService">Transaction Service</link> and
+ JBossCache <link linkend="JCR.JBossTransactionsService">Transaction
+ Manager</link>. Your exo-configuration.xml must contain such
parts:</para>
-
+
<programlisting language="xml"><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.GenericTransactionManagerLookup</type>^
@@ -50,71 +65,79 @@
</init-params>
</component></programlisting>
</listitem>
+
<listitem>
<para>Start server:</para>
+
<itemizedlist>
<listitem>
<para>bin/run.sh for Unix</para>
</listitem>
+
<listitem>
<para>bin/run.bat for Windows</para>
</listitem>
</itemizedlist>
</listitem>
+
<listitem>
<para>Try accessing <uri>http://localhostu:8080/browser</uri> with
- root/exo as login/password if you have done everything right, you'll
+ root/exo as login/password if you have done everything right, you'll
get access to repository browser.</para>
</listitem>
</orderedlist>
</section>
+
<section id="JCR.ClusterConfig.JCRExternalConfig">
<title>Configuring JCR to use external configuration</title>
+
<itemizedlist>
<listitem>
<para>To manually configure repository, create a new configuration
- file (e.g., exo-jcr-configuration.xml). For details, see <link linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
+ file (e.g., exo-jcr-configuration.xml). For details, see <link
+ linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
configuration must look like:</para>
-
- <programlisting language="xml"><repository-service default-repository="repository1">
+
+ <programlisting language="xml"><repository-service default-repository="repository1">
<repositories>
- <repository name="repository1" system-workspace="ws1" default-workspace="ws1">
+ <repository name="repository1" system-workspace="ws1" default-workspace="ws1">
<security-domain>exo-domain</security-domain>
<access-control>optional</access-control>
<authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
<workspaces>
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="oracle" />
- <property name="multi-db" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="../temp/swap/production" />
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="oracle" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="../temp/swap/production" />
</properties>
<value-storages>
- see "<link linkend="conf_value_storage">Value storage configuration</link>" part.
+ see "<link linkend="conf_value_storage">Value storage configuration</link>" part.
</value-storages>
</container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
<properties>
- <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
- see "<link linkend="conf_cache">Cache configuration</link>" part.
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ see "<link linkend="conf_cache">Cache configuration</link>" part.
</cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- see "<link linkend="conf_indexer">Indexer configuration</link>" part.
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ see "<link linkend="conf_indexer">Indexer configuration</link>" part.
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- see "<link linkend="conf_lock_manager">Lock Manager configuration</link>" part.
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ see "<link linkend="conf_lock_manager">Lock Manager configuration</link>" part.
</lock-manager>
</workspace>
- <workspace name="ws2">
+ <workspace name="ws2">
...
</workspace>
- <workspace name="wsN">
+ <workspace name="wsN">
...
</workspace>
</workspaces>
@@ -122,10 +145,11 @@
</repositories>
</repository-service> </programlisting>
</listitem>
+
<listitem>
- <para>Then, update RepositoryServiceConfiguration configuration in
+ <para>Then, update RepositoryServiceConfiguration configuration in
exo-configuration.xml to use this file:</para>
-
+
<programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
@@ -141,97 +165,139 @@
</itemizedlist>
</section>
</section>
+
<section>
<title>Requirements</title>
+
<section>
<title>Environment requirements</title>
+
<itemizedlist>
<listitem>
<para>Every node of cluster MUST have the same mounted Network File
System with the read and write permissions on it.</para>
- <para>"/mnt/tornado" - path to the mounted Network File System (all
+
+ <para>"/mnt/tornado" - path to the mounted Network File System (all
cluster nodes must use the same NFS).</para>
</listitem>
+
<listitem>
<para>Every node of cluster MUST use the same database.</para>
</listitem>
+
<listitem>
- <para>The same Clusters on different nodes MUST have the same
- names (e.g., if Indexer cluster in workspace production on the first
- node has the name "production_indexer_cluster", then indexer clusters in
+ <para>The same Clusters on different nodes MUST have the same names
+ (e.g., if Indexer cluster in workspace production on the first node
+ has the name "production_indexer_cluster", then indexer clusters in
workspace production on all other nodes MUST have the same name
- "production_indexer_cluster" ).</para>
+ "production_indexer_cluster" ).</para>
</listitem>
</itemizedlist>
</section>
+
<section>
<title>Configuration requirements</title>
+
<para>Configuration of every workspace in repository must contains of
such parts:</para>
+
<itemizedlist>
<listitem id="conf_value_storage">
<para>Value Storage configuration:</para>
-
+
<programlisting language="xml"><value-storages>
- <value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="/mnt/tornado/temp/values/production" /> <!--path within NFS where ValueStorage will hold it's data-->
+ <property name="path" value="/mnt/tornado/temp/values/production" /> <!--path within NFS where ValueStorage will hold it's data-->
</properties>
<filters>
- <filter property-type="Binary" />
+ <filter property-type="Binary" />
</filters>
</value-storage>
</value-storages></programlisting>
</listitem>
+
<listitem id="conf_cache">
<para>Cache configuration:</para>
-
- <programlisting language="xml"><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+
+ <programlisting language="xml"><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-data.xml" /> <!-- path to JBoss Cache configuration for data storage -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name" value="JCR_Cluster_cache_production" /> <!-- JBoss Cache data storage cluster name -->
- <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-data.xml" /> <!-- path to JBoss Cache configuration for data storage -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_cache_production" /> <!-- JBoss Cache data storage cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true" />
</properties>
</cache> </programlisting>
</listitem>
+
<listitem id="conf_indexer">
<para>Indexer configuration:</para>
-
- <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+
+ <programlisting language="xml"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
- <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" /> <!-- path within NFS where ValueStorage will hold it's data -->
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache configuration for indexer -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name" value="JCR_Cluster_indexer_production" /> <!-- JBoss Cache indexer cluster name -->
- <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
+ <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" /> <!-- path within NFS where ValueStorage will hold it's data -->
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache configuration for indexer -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_indexer_production" /> <!-- JBoss Cache indexer cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true" />
</properties>
</query-handler> </programlisting>
</listitem>
+
<listitem id="conf_lock_manager">
<para>Lock Manager configuration:</para>
-
- <programlisting language="xml"><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+
+ <programlisting language="xml"><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!-- path to JBoss Cache configuration for lock manager -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jgroups-multiplexer-stack" value="true" />
- <property name="jbosscache-cluster-name" value="JCR_Cluster_lock_production" /> <!-- JBoss Cache locks cluster name -->
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!-- path to JBoss Cache configuration for lock manager -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_lock_production" /> <!-- JBoss Cache locks cluster name -->
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_production"/> <!-- the name of the DB table where lock's data will be stored -->
- <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_production_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-cl-cache.jdbc.table.name" value="jcrlocks_production"/> <!-- the name of the DB table where lock's data will be stored -->
+ <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_production_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"/>
</properties>
</lock-manager></programlisting>
</listitem>
</itemizedlist>
</section>
</section>
+
+ <section>
+ <title>How properly stop the node</title>
+
+ <para>To be sure that all transactions are over and JCR is in consistent
+ state after stopping node, you need to follow next steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Connect using JMX to one of cluster's node which you won't need
+ to stop.</para>
+ </listitem>
+
+ <listitem>
+ <para>Use RepositorySuspendController suspend all repositories (see
+ <link linkend="JCR.SearchIndexBackup">37.1 Repository
+ suspending</link>)</para>
+ </listitem>
+
+ <listitem>
+ <para>Stop the node</para>
+ </listitem>
+
+ <listitem>
+ <para>Use RepositorySuspendController to resume all repositories (see
+ <link linkend="JCR.SearchIndexBackup">37.3 Repository
+ resuming</link>)</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/ispn/ispn-integration.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/ispn/ispn-integration.xml 2012-02-08 15:46:49 UTC (rev 5587)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/ispn/ispn-integration.xml 2012-02-08 15:48:52 UTC (rev 5588)
@@ -53,6 +53,26 @@
<section>
<title>Workspaces configuration requirements</title>
+ <para>Each mentioned below components uses instances of Infinispan Cache
+ product for caching in clustered environment. So every element has it's
+ own transport and has to be configured in a proper way. As usual,
+ workspaces have similar configuration. The simplest way to configure them
+ is to define their own configuration files for each component in each
+ workspace. There are several commons parameters. <abbrev></abbrev></para>
+
+ <para><abbrev>"infinispan-configuration"</abbrev> defines path to template
+ based configuration for Infinispan Cache instance. </para>
+
+ <para>JGroups is used by Infinispan Cache for network communications and
+ transport in a clustered environment. If property
+ <abbrev>"jgroups-configuration"</abbrev> is defined in component
+ configuration, it will be injected into the Infinispan Cache instance on
+ startup.</para>
+
+ <para>The another parameter is <abbrev>"infinispan-cluster-name".</abbrev>
+ This defines the name of the cluster. Needs to be the same for all nodes
+ in a cluster in order to find each other.</para>
+
<itemizedlist>
<listitem>
<para>Cache configuration:</para>
@@ -81,6 +101,17 @@
</properties>
</query-handler>
</programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para><abbrev>changesfilter-class</abbrev> - defines cluster-ready
+ index strategy based on Infinispan Cache, it can be either
+ <classname>org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter</classname>
+ (for shared index) or
+ <classname>org.exoplatform.services.jcr.impl.core.query.ispn.LocalIndexChangesFilter</classname>
+ (for local index)</para>
+ </listitem>
+ </itemizedlist>
</listitem>
<listitem>
@@ -103,6 +134,51 @@
</properties>
</lock-manager>^
</programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.table.name</abbrev> - table
+ name</para>
+ </listitem>
+
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.table.create</abbrev> - is
+ true or false. Indicates whether to create table at start phase.
+ If true, the table is created if it does not already exist.</para>
+ </listitem>
+
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.table.drop</abbrev> - is
+ true or false. Indicates whether to drop the table at stop
+ phase.</para>
+ </listitem>
+
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.id.column</abbrev> - id
+ column name</para>
+ </listitem>
+
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.data.column</abbrev> - data
+ column name</para>
+ </listitem>
+
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.timestamp.column</abbrev> -
+ timestamp column name</para>
+ </listitem>
+
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.datasource</abbrev> - name
+ of configured in Container datasource, where you want to store
+ locks. The best idea is to use the same as for workspace.</para>
+ </listitem>
+
+ <listitem>
+ <para><abbrev>infinispan-cl-cache.jdbc.connectionFactory</abbrev>
+ - connection factories for use with the JDBC Cache Store.</para>
+ </listitem>
+ </itemizedlist>
</listitem>
</itemizedlist>
</section>
@@ -350,10 +426,6 @@
<row>
<entry>jgroups-configuration</entry>
</row>
-
- <row>
- <entry>infinispan-cachestore-classname</entry>
- </row>
</tbody>
</tgroup>
</table>
More information about the exo-jcr-commits
mailing list