Author: nzamosenchuk
Date: 2010-02-16 11:00:38 -0500 (Tue, 16 Feb 2010)
New Revision: 1840
Added:
jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscache-configuration-templates.xml
Log:
EXOJCR-490: Added documentation on template-based configuration.
Added:
jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscache-configuration-templates.xml
===================================================================
---
jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscache-configuration-templates.xml
(rev 0)
+++
jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscache-configuration-templates.xml 2010-02-16
16:00:38 UTC (rev 1840)
@@ -0,0 +1,265 @@
+<?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>JBoss Cache configuration</title>
+ </articleinfo>
+
+ <section>
+ <title>JBoss cache configuration for indexer, lock manager and data
+ container</title>
+
+ <para>Each mentioned components uses instances of JBoss Cache product for
+ caching in clustered environment. So every element has it's own transport
+ and has to be configured in proper way. As usual, workspaces has similar
+ configuration but with different cluster-names and may-be some other
+ parameters. The simplest way to configure them is to define their's own
+ configuration files for each component in each workspace: </para>
+
+ <programlisting><property name="jbosscache-configuration"
value="conf/standalone/test-jbosscache-lock-db1-ws1.xml"
/></programlisting>
+
+ <para>But if there are few workspaces, configuring them in such a way can
+ be painful and hard-manageable. eXo JCR offers a template-based
+ configuration for JBoss Cache instances. You can have one template for
+ Lock Manager, one for Indexer and one for data container and use them in
+ all the workspaces, defining the map of substitution parameters in main
+ configuration file. Just simply define ${jbosscache-<parameter
+ name>} inside xml-template and list correct value in JCR configuration
+ file just below "jbosscache-configuration", as shown:</para>
+
+ <para>template: </para>
+
+ <programlisting>...
+<clustering mode="replication"
clusterName="${jbosscache-cluster-name}">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false"
/>
+...</programlisting>
+
+ <para>and JCR configuration file: </para>
+
+ <programlisting>...
+<property name="jbosscache-configuration"
value="jar:/conf/portal/jbosscache-lock.xml" />
+<property name="jbosscache-cluster-name"
value="JCR-cluster-locks-db1-ws" />
+...</programlisting>
+ </section>
+
+ <section>
+ <title>JGroups configuration</title>
+
+ <para>JGroups is used by JBoss Cache for network communications and
+ transport in clustered environment. If property "jgroups-configuration" is
+ defined in component configuration, it will be injected into the JBoss
+ Cache instance on startup. </para>
+
+ <programlisting><property name="jgroups-configuration"
value="your/path/to/modified-udp.xml" /></programlisting>
+
+ <para>As mentioned above, each component (lock manager, data container and
+ query handler) for each workspace requires it's own clustered environment.
+ Saying with another words, they have their own clusters with unique names.
+ By default each cluster should perform multi-casts on separate port. This
+ configuration leads to great unnecessary overhead on cluster. Thats why
+ JGroups offers multiplexer feature, providing ability to use one single
+ channel for set of clusters. This feature reduces network overheads
+ increasing performance and stability of application. To enable multiplexer
+ stack, You should define appropriate configuration file (upd-mux.xml is
+ pre-shipped one with eXo JCR) and set "jgroups-multiplexer-stack" into
+ "true".</para>
+
+ <programlisting><property name="jgroups-configuration"
value="jar:/conf/portal/udp-mux.xml" />
+<property name="jgroups-multiplexer-stack" value="true"
/></programlisting>
+ </section>
+
+ <section>
+ <title>Shipped JBoss Cache configuration templates</title>
+
+ <para>Exo JCR implementation is shipped with ready-to-use JBoss Cache
+ configuration templates for JCR's components. They are situated in
+ application package in /conf/porta/ folder.</para>
+
+ <section>
+ <title>Data container template</title>
+
+ <para>Data container template is "jbosscache-data.xml"
It's</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>
+
+ <!-- Eviction configuration -->
+ <eviction wakeUpInterval="5000">
+ <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
+
actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ParentNodeEvictionActionPolicy"
+ eventQueueSize="1000000">
+ <property name="maxNodes" value="1000000" />
+ <property name="timeToLive" value="120000" />
+ </default>
+ </eviction>
+</jbosscache></programlisting>
+
+ <table>
+ <title>Template variables</title>
+
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry align="center">Variable</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>jbosscache-cluster-name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para> </para>
+ </section>
+
+ <section>
+ <title>Lock manager template</title>
+
+ <para>It's template name is "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">
+ <preload>
+ <node fqn="/" />
+ </preload>
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader"
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>
+
+ <table>
+ <title>Template variables</title>
+
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry align="center">Variable</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>jbosscache-cluster-name</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.table.name</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.table.create</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.table.drop</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.table.primarykey</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.fqn.column</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.fqn.type</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.node.column</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.node.type</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.parent.column</entry>
+ </row>
+
+ <row>
+ <entry>jbosscache-cl-cache.jdbc.datasource</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Query handler (indexer) template</title>
+
+ <para>Have a look at "jbosscache-indexer.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>
+ <!-- Eviction configuration -->
+ <eviction wakeUpInterval="5000">
+ <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm"
eventQueueSize="1000000">
+ <property name="maxNodes" value="10000" />
+ <property name="minTimeToLive" value="60000"
/>
+ </default>
+ </eviction>
+</jbosscache></programlisting>
+ <table>
+ <title>Template variables</title>
+
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry align="center">Variable</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>jbosscache-cluster-name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ </section>
+</article>
Property changes on:
jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscache-configuration-templates.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain