Author: sergiykarpenko
Date: 2010-02-17 11:40:01 -0500 (Wed, 17 Feb 2010)
New Revision: 1879
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/cluster-config.xml
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/lock-manager-config.xml
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml
Log:
EXOJCR-490: docbook version updated
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/cluster-config.xml
===================================================================
---
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/cluster-config.xml 2010-02-17
16:32:39 UTC (rev 1878)
+++
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/cluster-config.xml 2010-02-17
16:40:01 UTC (rev 1879)
@@ -1,251 +1,251 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3b2/docbookx.dtd">
-<article>
- <articleinfo>
- <title>Configuring JBoss AS with eXo JCR in cluster</title>
- </articleinfo>
-
- <sect1>
- <title>Launching Cluster</title>
-
- <sect2>
- <title>Deploying eXo JCR to JBoss As</title>
-
- <para>To deploy eXo JCR to JBoss As follow next steps:</para>
-
- <orderedlist>
- <listitem>
- <para>Dowload the latest version of eXo JCR ear distribution from
- [LINK THERE]</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><application-policy
name="exo-domain">
- <authentication>
- <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required"></login-module>
- </authentication>
-</application-policy></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 <ulink
-
url="http://localhost:8080/browser">http://localhost:8080/browser</ulink>
- with root/exo as login/password if you have done everything right,
- you'll get access to repository browser.</para>
- </listitem>
- </orderedlist>
- </sect2>
-
- <sect2>
- <title>Configuring JCR to use external configuration</title>
-
- <itemizedlist>
- <listitem>
- <para>To manually configure repository create a new configuration
- file (f.e. exo-jcr-configuration.xml). For details see <ulink
-
url="http://wiki.exoplatform.org/xwiki/bin/view/JCR/#HConfiguration&...
- Configuration</ulink>. Your configuration must look like:</para>
-
- <programlisting><repository-service
default-repository="repository1">
- <repositories>
- <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">
- <properties>
- <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 "Value storage configuration" part.
- </value-storages>
- </container>
- <initializer
class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype"
value="nt:unstructured" />
- </properties>
- </initializer>
- <cache enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
- see "Cache configuration" part.
- </cache>
- <query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- see "Indexer configuration" part.
- </query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- see "Lock Manager configuration" part.
- </lock-manager>
- </workspace>
- <workspace name="ws2">
- ...
- </workspace>
- <workspace name="wsN">
- ...
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service> </programlisting>
- </listitem>
-
- <listitem>
- <para>and update RepositoryServiceConfiguration configuration in
- exo-configuration.xml to use this
file:<programlisting><component>
-
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
-
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>exo-jcr-configuration.xml</value>
- </value-param>
- </init-params>
-</component></programlisting></para>
- </listitem>
- </itemizedlist>
- </sect2>
- </sect1>
-
- <sect1>
- <title>Requirements</title>
-
- <sect2>
- <title>Enviorenment requirements</title>
-
- <itemizedlist>
- <listitem>
- <para>Every node of cluster MUST have the same mounted Network File
- System with read and write permissions on it.</para>
-
- <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>Same Clusters on different nodes MUST have the same cluster
- names (f.e if Indexer cluster in workspace production on the first
- node has name "production_indexer_cluster", then indexer clusters in
- workspace production on all other nodes MUST have the same name
- "production_indexer_cluster" )</para>
- </listitem>
- </itemizedlist>
- </sect2>
-
- <sect2>
- <title>Enviorenment requirements</title>
-
- <para>Configuration of every workspace in repository must contains of
- such parts:</para>
-
- <itemizedlist>
- <listitem>
- <para>Value Storage configuration:</para>
-
- <programlisting><value-storages>
- <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
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
-</value-storages></programlisting>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <listitem>
- <para>Cache configuration:</para>
-
- <programlisting><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"
/>
- </properties>
-</cache> </programlisting>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <listitem>
- <para>Indexer configuration:</para>
-
- <programlisting><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"
/>
- </properties>
-</query-handler> </programlisting>
- </listitem>
-
- <listitem>
- <para>Lock Manager configuration:</para>
-
- <programlisting><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="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>
- </sect2>
- </sect1>
-</article>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<article>
+ <articleinfo>
+ <title>Configuring JBoss AS with eXo JCR in cluster</title>
+ </articleinfo>
+
+ <section>
+ <title>Launching Cluster</title>
+
+ <section>
+ <title>Deploying eXo JCR to JBoss As</title>
+
+ <para>To deploy eXo JCR to JBoss As follow next steps:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Dowload the latest version of eXo JCR ear distribution from
+ [LINK THERE]</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><application-policy
name="exo-domain">
+ <authentication>
+ <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required"></login-module>
+ </authentication>
+</application-policy></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 <ulink
+
url="http://localhost:8080/browser">http://localhost:8080/browser</ulink>
+ with root/exo as login/password if you have done everything right,
+ you'll get access to repository browser.</para>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section>
+ <title>Configuring JCR to use external configuration</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>To manually configure repository create a new configuration
+ file (f.e. exo-jcr-configuration.xml). For details see <ulink
+
url="http://wiki.exoplatform.org/xwiki/bin/view/JCR/#HConfiguration&...
+ Configuration</ulink>. Your configuration must look like:</para>
+
+ <programlisting><repository-service
default-repository="repository1">
+ <repositories>
+ <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">
+ <properties>
+ <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 "Value storage configuration" part.
+ </value-storages>
+ </container>
+ <initializer
class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name="root-nodetype"
value="nt:unstructured" />
+ </properties>
+ </initializer>
+ <cache enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ see "Cache configuration" part.
+ </cache>
+ <query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ see "Indexer configuration" part.
+ </query-handler>
+ <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ see "Lock Manager configuration" part.
+ </lock-manager>
+ </workspace>
+ <workspace name="ws2">
+ ...
+ </workspace>
+ <workspace name="wsN">
+ ...
+ </workspace>
+ </workspaces>
+ </repository>
+ </repositories>
+</repository-service> </programlisting>
+ </listitem>
+
+ <listitem>
+ <para>and update RepositoryServiceConfiguration configuration in
+ exo-configuration.xml to use this
file:<programlisting><component>
+
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>exo-jcr-configuration.xml</value>
+ </value-param>
+ </init-params>
+</component></programlisting></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <section>
+ <title>Requirements</title>
+
+ <section>
+ <title>Enviorenment requirements</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Every node of cluster MUST have the same mounted Network File
+ System with read and write permissions on it.</para>
+
+ <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>Same Clusters on different nodes MUST have the same cluster
+ names (f.e if Indexer cluster in workspace production on the first
+ node has name "production_indexer_cluster", then indexer clusters in
+ workspace production on all other nodes MUST have the same name
+ "production_indexer_cluster" )</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Enviorenment requirements</title>
+
+ <para>Configuration of every workspace in repository must contains of
+ such parts:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Value Storage configuration:</para>
+
+ <programlisting><value-storages>
+ <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
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+</value-storages></programlisting>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>Cache configuration:</para>
+
+ <programlisting><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"
/>
+ </properties>
+</cache> </programlisting>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>Indexer configuration:</para>
+
+ <programlisting><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"
/>
+ </properties>
+</query-handler> </programlisting>
+ </listitem>
+
+ <listitem>
+ <para>Lock Manager configuration:</para>
+
+ <programlisting><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="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>
+</article>
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/lock-manager-config.xml
===================================================================
---
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/lock-manager-config.xml 2010-02-17
16:32:39 UTC (rev 1878)
+++
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/lock-manager-config.xml 2010-02-17
16:40:01 UTC (rev 1879)
@@ -1,442 +1,437 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3b2/docbookx.dtd">
-<article>
- <articleinfo>
- <title>LockManager configuration</title>
- </articleinfo>
-
- <sect1>
- <title>Introduction</title>
-
- <para>What LockManager does?</para>
-
- <para>In common words, LockManager stores lock objects, so it can give
- Lock object or can release it, etc.</para>
-
- <para>Also LockManager is responsible for removing Locks that live too
- long. This parameter may be configured with "time-out"
property.</para>
-
- <para>JCR provide two base implementation of LockManager:</para>
-
- <itemizedlist>
- <listitem>
-
<para>org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;</para>
- </listitem>
-
- <listitem>
-
<para>org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl;</para>
- </listitem>
- </itemizedlist>
-
- <para>In this article we will talk mostly about
- CacheableLockManagerImpl.</para>
-
- <para>You can enable LockManager by adding lock-manager-configuration to
- workspace-configuration.</para>
-
- <para>For example:</para>
-
- <programlisting><workspace name="ws">
- ...
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- ...
- </properties>
- </lock-manager>
- ...
-</workspace></programlisting>
- </sect1>
-
- <sect1>
- <title>LockManagerImpl</title>
-
- <para>LockManagerImpl is simple implementation of LockManager, and also
- faster than CacheableLockManager. It stores Lock objects in HashMap and
- may also persist Locks if LockPersister is configured. LockManagerImpl do
- not support replication in any way.</para>
-
- <para>See <ulink
-
url="http://wiki.exoplatform.com/xwiki/bin/view/JCR/Configuration#HL...
- configuration</ulink></para>
- </sect1>
-
- <sect1>
- <title>CacheableLockManagerImpl</title>
-
- <para>CacheableLockManagerImpl stores Lock object in JBoss-cache, so Locks
- are replicable and affects on cluster, not only a single node. Also
- JBoss-cache has JDBCCacheLoader, so locks will be stored to
- database.</para>
-
- <para>Both implementation supports Expired Locks removing. There is
- LockRemover - separate thread, that periodically ask LockManager for Locks
- that lives to much and must be removed. So, timeout for LockRemover may be
- set as follows, default value is 30m.</para>
-
- <programlisting><properties>
- <property name="time-out" value="10m" />
- ...
-</properties></programlisting>
-
- <para>Replication requirements are same as for Cache</para>
-
- <warning>
- <para>[TODO add link to replication configuration]</para>
- </warning>
-
- <sect2>
- <title>Configuration</title>
-
- <para>Replication requirements are same as for Cache</para>
-
- <para>Common tips:</para>
-
- <itemizedlist>
- <listitem>
- <para>clusterName ("jbosscache-cluster-name") must be
unique;</para>
- </listitem>
-
- <listitem>
- <para>cache.jdbc.table.name must be unique per datasource;</para>
- </listitem>
-
- <listitem>
- <para>cache.jdbc.fqn.type must and cache.jdbc.node.type must be
- configured according to used database;</para>
- </listitem>
- </itemizedlist>
-
- <para>There is few ways how to configure CacheableLockManagerImpl, and
- all of them configures JBoss-cache and JDBCCacheLoader.</para>
-
- <para>See <ulink
-
url="http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader"...
- </sect2>
-
- <sect2>
- <title>Simple JbossCache Configuraion</title>
-
- <para>First one is - put JbossCache configuraion file path to
- CacheableLockManagerImpl</para>
-
- <para><note>
- <para>This configuration is not so good, as you can think. Because
- repository may contain many workspaces, and each workspace must
- contain LockManager configuration, and LockManager config may
- contain JbossCache config file. So total configuration is growing
- up. But it is usefull if we want a single LockManager with special
- configuration.</para>
- </note></para>
-
- <para>Config is:</para>
-
- <programlisting><lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration"
value="conf/standalone/cluster/test-jbosscache-lock-config.xml" />
- </properties>
-</lock-manager></programlisting>
-
- <para>test-jbosscache-lock-config.xml<programlisting><?xml
version="1.0" encoding="UTF-8"?>
-<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.2">
-
- <locking useLockStriping="false" concurrencyLevel="50000"
lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"
/>
-
- <clustering mode="replication"
clusterName="JBoss-Cache-Lock-Cluster_Name">
- <stateRetrieval timeout="20000" fetchInMemoryState="false"
nonBlocking="true" />
- <jgroupsConfig>
-
- <TCP bind_addr="127.0.0.1" start_port="9800"
loopback="true" recv_buf_size="20000000"
send_buf_size="640000" discard_incompatible_packets="true"
- max_bundle_size="64000" max_bundle_timeout="30"
use_incoming_packet_handler="true" enable_bundling="false"
use_send_queues="false" sock_conn_timeout="300"
- skip_suspected_members="true" use_concurrent_stack="true"
thread_pool.enabled="true" thread_pool.min_threads="1"
thread_pool.max_threads="25"
- thread_pool.keep_alive_time="5000"
thread_pool.queue_enabled="false" thread_pool.queue_max_size="100"
thread_pool.rejection_policy="run"
- oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1"
oob_thread_pool.max_threads="8"
oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="run" />
- <MPING timeout="2000" num_initial_members="2"
mcast_port="34540" bind_addr="127.0.0.1"
mcast_addr="224.0.0.1" />
-
-
- <MERGE2 max_interval="30000" min_interval="10000"
/>
- <FD_SOCK />
- <FD max_tries="5" shun="true" timeout="10000"
/>
- <VERIFY_SUSPECT timeout="1500" />
- <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false"
/>
- <UNICAST timeout="300,600,1200,2400,3600" />
- <pbcast.STABLE desired_avg_gossip="50000"
max_bytes="400000" stability_delay="1000" />
- <pbcast.GMS join_timeout="5000" print_local_addr="true"
shun="false" view_ack_collection_timeout="5000"
view_bundling="true" />
- <FRAG2 frag_size="60000" />
- <pbcast.STREAMING_STATE_TRANSFER />
- <pbcast.FLUSH timeout="0" />
-
- </jgroupsConfig
-
- <sync />
- </clustering>
-
- <loaders passivation="false" shared="true">
- <preload>
- <node fqn="/" />
- </preload>
- <loader class="org.jboss.cache.loader.JDBCCacheLoader"
async="false" fetchPersistentState="false"
ignoreModifications="false" purgeOnStartup="false">
- <properties>
- cache.jdbc.table.name=jcrlocks_ws
- cache.jdbc.table.create=true
- cache.jdbc.table.drop=false
- cache.jdbc.table.primarykey=jcrlocks_ws_pk
- cache.jdbc.fqn.column=fqn
- cache.jdbc.fqn.type=VARCHAR(512)
- cache.jdbc.node.column=node
- cache.jdbc.node.type=<BLOB>
- cache.jdbc.parent.column=parent
- cache.jdbc.datasource=jdbcjcr
- </properties>
- </loader>
-
- </loaders>
-
-</jbosscache></programlisting></para>
-
- <para>Configuration requirements:</para>
-
- <itemizedlist>
- <listitem>
- <para><clustering mode="replication"
- clusterName="JBoss-Cache-Lock-Cluster_Name"> - cluster name
must
- be unique;</para>
- </listitem>
-
- <listitem>
- <para><quote>cache.jdbc.table.name</quote> must be unique
per
- datasource;</para>
- </listitem>
-
- <listitem>
- <para><quote>cache.jdbc.node.type</quote> and
- <quote>cache.jdbc.fqn.type</quote> must be configured according to
- using database. See <link linkend='datatypes'
endterm="datatypes.title"/> .</para>
- </listitem>
- </itemizedlist>
- </sect2>
-
- <sect2>
- <title>Template JBossCache Configuration</title>
-
- <para>Second one is - use template JBoss-cache configuration for all
- LockManagers</para>
-
- <para><citetitle>Lock template
configuration</citetitle></para>
-
- <para>test-jbosscache-lock.xml</para>
-
- <programlisting><?xml version="1.0"
encoding="UTF-8"?>
-<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
-
- <locking useLockStriping="false" concurrencyLevel="50000"
lockParentForChildInsertRemove="false"
- lockAcquisitionTimeout="20000" />
-
- <clustering mode="replication"
clusterName="${jbosscache-cluster-name}">
- <stateRetrieval timeout="20000"
fetchInMemoryState="false" />
- <jgroupsConfig multiplexerStack="jcr.stack" />
- <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="org.jboss.cache.loader.JDBCCacheLoader"
async=q"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>As you see, all configurable paramaters filled by templates and
- will be replaced by LockManagers conf parameters:</para>
-
- <programlisting><lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration"
value="test-jbosscache-lock.xml" />
- <property name="jgroups-configuration"
value="udp-mux.xml" />
- <property name="jgroups-multiplexer-stack" value="true"
/>
- <property name="jbosscache-cluster-name"
value="JCR-cluster-locks-ws" />
- <property name="jbosscache-cl-cache.jdbc.table.name"
value="jcrlocks_ws" />
- <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_ws_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="AUTO"/>
- <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type"
value="AUTO"/>
- <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr" />
- </properties>
-</lock-manager></programlisting>
-
- <para>Configuration requirements:<itemizedlist>
- <listitem>
- <para><quote>jbosscache-cl-cache.jdbc.fqn.column</quote>
and
- <quote>jbosscache-cl-cache.jdbc.node.type</quote> is nothing
else
- as cache.jdbc.fqn.type and cache.jdbc.node.type in JBoss-Cache
- configuration. You can set those data types according to database
- type (See <link linkend='datatypes'
endterm="datatypes.title"/>) or set it as
- AUTO (or do not set at all) and data type will by detected
- automaticaly.</para>
- </listitem>
-
- <listitem>
- <para>as you see, jgroups-configuration moved to separate config
- file - udp-mux.xml; In our case udp-mux.xml is common JGroup
- config for all components (QueryHandler, cache, LockManager). But
- we, still, can create own config.</para>
- </listitem>
- </itemizedlist></para>
-
- <para>our-udp-mux.xml<programlisting><protocol_stacks>
- <stack name="jcr.stack">
- <config>
- <UDP mcast_addr="228.10.10.10" mcast_port="45588"
tos="8" ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000"
mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
loopback="false"
- discard_incompatible_packets="true"
max_bundle_size="64000" max_bundle_timeout="30"
- use_incoming_packet_handler="true" ip_ttl="2"
enable_bundling="true" enable_diagnostics="true"
- thread_naming_pattern="cl" use_concurrent_stack="true"
thread_pool.enabled="true" thread_pool.min_threads="2"
- thread_pool.max_threads="8"
thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="1000"
thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
oob_thread_pool.max_threads="8"
oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="Run" />
-
- <PING timeout="2000" num_initial_members="3"
/>
- <MERGE2 max_interval="30000" min_interval="10000"
/>
- <FD_SOCK />
- <FD timeout="10000" max_tries="5"
shun="true" />
- <VERIFY_SUSPECT timeout="1500" />
- <BARRIER />
- <pbcast.NAKACK use_stats_for_retransmission="false"
exponential_backoff="150" use_mcast_xmit="true"
- gc_lag="0" retransmit_timeout="50,300,600,1200"
discard_delivered_msgs="true" />
- <UNICAST timeout="300,600,1200" />
- <pbcast.STABLE stability_delay="1000"
desired_avg_gossip="50000" max_bytes="1000000" />
- <VIEW_SYNC avg_send_interval="60000" />
- <pbcast.GMS print_local_addr="true"
join_timeout="3000" shun="false" view_bundling="true"
/>
- <FC max_credits="500000" min_threshold="0.20"
/>
- <FRAG2 frag_size="60000" />
- <!--pbcast.STREAMING_STATE_TRANSFER /-->
- <pbcast.STATE_TRANSFER />
- <!-- pbcast.FLUSH /-->
- </config>
- </stack>
-</protocol_stacks> </programlisting></para>
- </sect2>
-
- <sect2 id="datatypes">
- <title id="datatypes.title">Data Types in Different
Databases</title>
-
- <table>
- <title>Fqn type and node type in different databases</title>
-
- <tgroup cols="3">
- <thead>
- <row>
- <entry>DataBase name</entry>
-
- <entry>Node data type</entry>
-
- <entry>FQN data type</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>default</entry>
-
- <entry>BLOB</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
-
- <row>
- <entry>HSSQL</entry>
-
- <entry>OBJECT</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
-
- <row>
- <entry>MySQL</entry>
-
- <entry>LONGBLOB</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
-
- <row>
- <entry>ORACLE</entry>
-
- <entry>BLOB</entry>
-
- <entry>VARCHAR2(512)</entry>
- </row>
-
- <row>
- <entry>PostgreSQL</entry>
-
- <entry>bytea</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
-
- <row>
- <entry>MSSQL</entry>
-
- <entry>VARBINARY(MAX)</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
-
- <row>
- <entry>DB2</entry>
-
- <entry>BLOB</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
-
- <row>
- <entry>Sybase</entry>
-
- <entry>IMAGE</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
-
- <row>
- <entry>Ingres</entry>
-
- <entry>long byte</entry>
-
- <entry>VARCHAR(512)</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
- </sect1>
-</article>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<article>
+ <articleinfo>
+ <title>LockManager configuration</title>
+ </articleinfo>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>What LockManager does?</para>
+
+ <para>In common words, LockManager stores lock objects, so it can give
+ Lock object or can release it, etc.</para>
+
+ <para>Also LockManager is responsible for removing Locks that live too
+ long. This parameter may be configured with "time-out"
property.</para>
+
+ <para>JCR provide two base implementation of LockManager:</para>
+
+ <itemizedlist>
+ <listitem>
+
<para>org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;</para>
+ </listitem>
+
+ <listitem>
+
<para>org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl;</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>In this article we will talk mostly about
+ CacheableLockManagerImpl.</para>
+
+ <para>You can enable LockManager by adding lock-manager-configuration to
+ workspace-configuration.</para>
+
+ <para>For example:</para>
+
+ <programlisting><workspace name="ws">
+ ...
+ <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ ...
+ </properties>
+ </lock-manager>
+ ...
+</workspace></programlisting>
+ </section>
+
+ <section>
+ <title>LockManagerImpl</title>
+
+ <para>LockManagerImpl is simple implementation of LockManager, and also
+ faster than CacheableLockManager. It stores Lock objects in HashMap and
+ may also persist Locks if LockPersister is configured. LockManagerImpl do
+ not support replication in any way.</para>
+
+ <para>See <ulink
+
url="http://wiki.exoplatform.com/xwiki/bin/view/JCR/Configuration#HL...
+ configuration</ulink></para>
+ </section>
+
+ <section>
+ <title>CacheableLockManagerImpl</title>
+
+ <para>CacheableLockManagerImpl stores Lock object in JBoss-cache, so Locks
+ are replicable and affects on cluster, not only a single node. Also
+ JBoss-cache has JDBCCacheLoader, so locks will be stored to
+ database.</para>
+
+ <para>Both implementation supports Expired Locks removing. There is
+ LockRemover - separate thread, that periodically ask LockManager for Locks
+ that lives to much and must be removed. So, timeout for LockRemover may be
+ set as follows, default value is 30m.</para>
+
+ <programlisting><properties>
+ <property name="time-out" value="10m" />
+ ...
+</properties></programlisting>
+
+ <section>
+ <title>Configuration</title>
+
+ <para>Replication requirements are same as for Cache</para>
+
+ <para>Common tips:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>clusterName ("jbosscache-cluster-name") must be
unique;</para>
+ </listitem>
+
+ <listitem>
+ <para>cache.jdbc.table.name must be unique per datasource;</para>
+ </listitem>
+
+ <listitem>
+ <para>cache.jdbc.fqn.type must and cache.jdbc.node.type must be
+ configured according to used database;</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>There is few ways how to configure CacheableLockManagerImpl, and
+ all of them configures JBoss-cache and JDBCCacheLoader.</para>
+
+ <para>See <ulink
+
url="http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader"...
+ </section>
+
+ <section>
+ <title>Simple JbossCache Configuraion</title>
+
+ <para>First one is - put JbossCache configuraion file path to
+ CacheableLockManagerImpl</para>
+
+ <para><note>
+ <para>This configuration is not so good, as you can think. Because
+ repository may contain many workspaces, and each workspace must
+ contain LockManager configuration, and LockManager config may
+ contain JbossCache config file. So total configuration is growing
+ up. But it is usefull if we want a single LockManager with special
+ configuration.</para>
+ </note></para>
+
+ <para>Config is:</para>
+
+ <programlisting><lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration"
value="conf/standalone/cluster/test-jbosscache-lock-config.xml" />
+ </properties>
+</lock-manager></programlisting>
+
+ <para>test-jbosscache-lock-config.xml<programlisting><?xml
version="1.0" encoding="UTF-8"?>
+<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.2">
+
+ <locking useLockStriping="false" concurrencyLevel="50000"
lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"
/>
+
+ <clustering mode="replication"
clusterName="JBoss-Cache-Lock-Cluster_Name">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false"
nonBlocking="true" />
+ <jgroupsConfig>
+
+ <TCP bind_addr="127.0.0.1" start_port="9800"
loopback="true" recv_buf_size="20000000"
send_buf_size="640000" discard_incompatible_packets="true"
+ max_bundle_size="64000" max_bundle_timeout="30"
use_incoming_packet_handler="true" enable_bundling="false"
use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true"
thread_pool.enabled="true" thread_pool.min_threads="1"
thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000"
thread_pool.queue_enabled="false" thread_pool.queue_max_size="100"
thread_pool.rejection_policy="run"
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1"
oob_thread_pool.max_threads="8"
oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="2"
mcast_port="34540" bind_addr="127.0.0.1"
mcast_addr="224.0.0.1" />
+
+
+ <MERGE2 max_interval="30000" min_interval="10000"
/>
+ <FD_SOCK />
+ <FD max_tries="5" shun="true" timeout="10000"
/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false"
/>
+ <UNICAST timeout="300,600,1200,2400,3600" />
+ <pbcast.STABLE desired_avg_gossip="50000"
max_bytes="400000" stability_delay="1000" />
+ <pbcast.GMS join_timeout="5000" print_local_addr="true"
shun="false" view_ack_collection_timeout="5000"
view_bundling="true" />
+ <FRAG2 frag_size="60000" />
+ <pbcast.STREAMING_STATE_TRANSFER />
+ <pbcast.FLUSH timeout="0" />
+
+ </jgroupsConfig
+
+ <sync />
+ </clustering>
+
+ <loaders passivation="false" shared="true">
+ <preload>
+ <node fqn="/" />
+ </preload>
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader"
async="false" fetchPersistentState="false"
ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ cache.jdbc.table.name=jcrlocks_ws
+ cache.jdbc.table.create=true
+ cache.jdbc.table.drop=false
+ cache.jdbc.table.primarykey=jcrlocks_ws_pk
+ cache.jdbc.fqn.column=fqn
+ cache.jdbc.fqn.type=VARCHAR(512)
+ cache.jdbc.node.column=node
+ cache.jdbc.node.type=<BLOB>
+ cache.jdbc.parent.column=parent
+ cache.jdbc.datasource=jdbcjcr
+ </properties>
+ </loader>
+
+ </loaders>
+
+</jbosscache></programlisting></para>
+
+ <para>Configuration requirements:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><clustering mode="replication"
+ clusterName="JBoss-Cache-Lock-Cluster_Name"> - cluster name
must
+ be unique;</para>
+ </listitem>
+
+ <listitem>
+ <para><quote>cache.jdbc.table.name</quote> must be unique
per
+ datasource;</para>
+ </listitem>
+
+ <listitem>
+ <para><quote>cache.jdbc.node.type</quote> and
+ <quote>cache.jdbc.fqn.type</quote> must be configured according to
+ using database. See <link endterm="datatypes.title"
+ linkend="datatypes"></link> .</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Template JBossCache Configuration</title>
+
+ <para>Second one is - use template JBoss-cache configuration for all
+ LockManagers</para>
+
+ <para><citetitle>Lock template
configuration</citetitle></para>
+
+ <para>test-jbosscache-lock.xml</para>
+
+ <programlisting><?xml version="1.0"
encoding="UTF-8"?>
+<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
+
+ <locking useLockStriping="false" concurrencyLevel="50000"
lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000" />
+
+ <clustering mode="replication"
clusterName="${jbosscache-cluster-name}">
+ <stateRetrieval timeout="20000"
fetchInMemoryState="false" />
+ <jgroupsConfig multiplexerStack="jcr.stack" />
+ <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="org.jboss.cache.loader.JDBCCacheLoader"
async=q"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>As you see, all configurable paramaters filled by templates and
+ will be replaced by LockManagers conf parameters:</para>
+
+ <programlisting><lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <properties>
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration"
value="test-jbosscache-lock.xml" />
+ <property name="jgroups-configuration"
value="udp-mux.xml" />
+ <property name="jgroups-multiplexer-stack" value="true"
/>
+ <property name="jbosscache-cluster-name"
value="JCR-cluster-locks-ws" />
+ <property name="jbosscache-cl-cache.jdbc.table.name"
value="jcrlocks_ws" />
+ <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_ws_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type"
value="AUTO"/>
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type"
value="AUTO"/>
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr" />
+ </properties>
+</lock-manager></programlisting>
+
+ <para>Configuration requirements:<itemizedlist>
+ <listitem>
+ <para><quote>jbosscache-cl-cache.jdbc.fqn.column</quote>
and
+ <quote>jbosscache-cl-cache.jdbc.node.type</quote> is nothing
else
+ as cache.jdbc.fqn.type and cache.jdbc.node.type in JBoss-Cache
+ configuration. You can set those data types according to database
+ type (See <link endterm="datatypes.title"
+ linkend="datatypes"></link>) or set it as AUTO (or do not
set at
+ all) and data type will by detected automaticaly.</para>
+ </listitem>
+
+ <listitem>
+ <para>as you see, jgroups-configuration moved to separate config
+ file - udp-mux.xml; In our case udp-mux.xml is common JGroup
+ config for all components (QueryHandler, cache, LockManager). But
+ we, still, can create own config.</para>
+ </listitem>
+ </itemizedlist></para>
+
+ <para>our-udp-mux.xml<programlisting><protocol_stacks>
+ <stack name="jcr.stack">
+ <config>
+ <UDP mcast_addr="228.10.10.10" mcast_port="45588"
tos="8" ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
loopback="false"
+ discard_incompatible_packets="true"
max_bundle_size="64000" max_bundle_timeout="30"
+ use_incoming_packet_handler="true" ip_ttl="2"
enable_bundling="true" enable_diagnostics="true"
+ thread_naming_pattern="cl" use_concurrent_stack="true"
thread_pool.enabled="true" thread_pool.min_threads="2"
+ thread_pool.max_threads="8"
thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
oob_thread_pool.max_threads="8"
oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="Run" />
+
+ <PING timeout="2000" num_initial_members="3"
/>
+ <MERGE2 max_interval="30000" min_interval="10000"
/>
+ <FD_SOCK />
+ <FD timeout="10000" max_tries="5"
shun="true" />
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission="false"
exponential_backoff="150" use_mcast_xmit="true"
+ gc_lag="0" retransmit_timeout="50,300,600,1200"
discard_delivered_msgs="true" />
+ <UNICAST timeout="300,600,1200" />
+ <pbcast.STABLE stability_delay="1000"
desired_avg_gossip="50000" max_bytes="1000000" />
+ <VIEW_SYNC avg_send_interval="60000" />
+ <pbcast.GMS print_local_addr="true"
join_timeout="3000" shun="false" view_bundling="true"
/>
+ <FC max_credits="500000" min_threshold="0.20"
/>
+ <FRAG2 frag_size="60000" />
+ <!--pbcast.STREAMING_STATE_TRANSFER /-->
+ <pbcast.STATE_TRANSFER />
+ <!-- pbcast.FLUSH /-->
+ </config>
+ </stack>
+</protocol_stacks> </programlisting></para>
+ </section>
+
+ <section id="datatypes">
+ <title id="datatypes.title">Data Types in Different
Databases</title>
+
+ <table>
+ <title>Fqn type and node type in different databases</title>
+
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>DataBase name</entry>
+
+ <entry>Node data type</entry>
+
+ <entry>FQN data type</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>default</entry>
+
+ <entry>BLOB</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+
+ <row>
+ <entry>HSSQL</entry>
+
+ <entry>OBJECT</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+
+ <row>
+ <entry>MySQL</entry>
+
+ <entry>LONGBLOB</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+
+ <row>
+ <entry>ORACLE</entry>
+
+ <entry>BLOB</entry>
+
+ <entry>VARCHAR2(512)</entry>
+ </row>
+
+ <row>
+ <entry>PostgreSQL</entry>
+
+ <entry>bytea</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+
+ <row>
+ <entry>MSSQL</entry>
+
+ <entry>VARBINARY(MAX)</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+
+ <row>
+ <entry>DB2</entry>
+
+ <entry>BLOB</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+
+ <row>
+ <entry>Sybase</entry>
+
+ <entry>IMAGE</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+
+ <row>
+ <entry>Ingres</entry>
+
+ <entry>long byte</entry>
+
+ <entry>VARCHAR(512)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ </section>
+</article>
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml
===================================================================
---
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml 2010-02-17
16:32:39 UTC (rev 1878)
+++
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handler-config.xml 2010-02-17
16:40:01 UTC (rev 1879)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3b2/docbookx.dtd">
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<article>
<articleinfo>
<title>QueryHandler configuration</title>
</articleinfo>
- <sect1>
+ <section>
<title>How does it work?</title>
<para>Lets talk about indexing content in cluster.</para>
@@ -51,12 +51,12 @@
<imagedata fileref="images/diagram-shared-index.png" />
</imageobject>
</mediaobject></para>
- </sect1>
+ </section>
- <sect1>
+ <section>
<title>Configuration</title>
- <sect2>
+ <section>
<title>Common requirements</title>
<para>Now, lets see what we need to run Search engine in cluster
@@ -79,9 +79,9 @@
<para>configure JBoss-cache, course;</para>
</listitem>
</itemizedlist></para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>Query-handler configuration</title>
<para>Configuration example:<programlisting><workspace
name="ws">
@@ -152,9 +152,9 @@
</tbody>
</tgroup>
</table></para>
- </sect2>
+ </section>
- <sect2>
+ <section>
<title>JBoss-Cache template configuration</title>
<para>JBoss-Cache template configuration for query handler.</para>
@@ -181,6 +181,6 @@
</eviction>
</jbosscache></programlisting></para>
- </sect2>
- </sect1>
+ </section>
+ </section>
</article>