From do-not-reply at jboss.org Tue Feb 16 11:00:39 2010 Content-Type: multipart/mixed; boundary="===============7229830455080032313==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: exo-jcr-commits at lists.jboss.org Subject: [exo-jcr-commits] exo-jcr SVN: r1840 - jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules. Date: Tue, 16 Feb 2010 11:00:39 -0500 Message-ID: <201002161600.o1GG0dCh012704@svn01.web.mwc.hst.phx2.redhat.com> --===============7229830455080032313== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-co= nfiguration-templates.xml Log: EXOJCR-490: Added documentation on template-based configuration. Added: jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscach= e-configuration-templates.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscache-c= onfiguration-templates.xml (rev 0) +++ jcr/trunk/docs/reference/en/src/main/docbook/en-us/modules/jbosscache-c= onfiguration-templates.xml 2010-02-16 16:00:38 UTC (rev 1840) @@ -0,0 +1,265 @@ + + +
+ + JBoss Cache configuration + + +
+ JBoss cache configuration for indexer, lock manager and data + container + + Each mentioned components uses instances of JBoss Cache product = for + caching in clustered environment. So every element has it's own transp= ort + and has to be configured in proper way. As usual, workspaces has simil= ar + 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: + + <property name=3D"jbosscache-configuration" value= =3D"conf/standalone/test-jbosscache-lock-db1-ws1.xml" /> + + 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 configurat= ion + file just below "jbosscache-configuration", as shown: + + template: + + ... +<clustering mode=3D"replication" clusterName=3D"${jbosscache-cluster-na= me}"> + <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" /> +... + + and JCR configuration file: + + ... +<property name=3D"jbosscache-configuration" value=3D"jar:/conf/portal/j= bosscache-lock.xml" /> +<property name=3D"jbosscache-cluster-name" value=3D"JCR-cluster-locks-d= b1-ws" /> +... +
+ +
+ JGroups configuration + + 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. + + <property name=3D"jgroups-configuration" value=3D"y= our/path/to/modified-udp.xml" /> + + As mentioned above, each component (lock manager, data container= and + query handler) for each workspace requires it's own clustered environm= ent. + Saying with another words, they have their own clusters with unique na= mes. + By default each cluster should perform multi-casts on separate port. T= his + 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 multipl= exer + stack, You should define appropriate configuration file (upd-mux.xml is + pre-shipped one with eXo JCR) and set "jgroups-multiplexer-stack" into + "true". + + <property name=3D"jgroups-configuration" value=3D"j= ar:/conf/portal/udp-mux.xml" /> +<property name=3D"jgroups-multiplexer-stack" value=3D"true" /> +
+ +
+ Shipped JBoss Cache configuration templates + + 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. + +
+ Data container template + + Data container template is "jbosscache-data.xml" It's + + <?xml version=3D"1.0" encoding=3D"UTF-8"?> +<jbosscache xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xml= ns=3D"urn:jboss:jbosscache-core:config:3.1"> + + <locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPa= rentForChildInsertRemove=3D"false" + lockAcquisitionTimeout=3D"20000" /> + + <clustering mode=3D"replication" clusterName=3D"${jbosscache-cluster= -name}"> + <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" /&= gt; + <jgroupsConfig multiplexerStack=3D"jcr.stack" /> + <sync /> + </clustering> + + <!-- Eviction configuration --> + <eviction wakeUpInterval=3D"5000"> + <default algorithmClass=3D"org.jboss.cache.eviction.LRUAlgorithm" + actionPolicyClass=3D"org.exoplatform.services.jcr.impl.dataflow.p= ersistent.jbosscache.ParentNodeEvictionActionPolicy" + eventQueueSize=3D"1000000"> + <property name=3D"maxNodes" value=3D"1000000" /> + <property name=3D"timeToLive" value=3D"120000" /> + </default> + </eviction> +</jbosscache> + + + Template variables + + + + + Variable + + + + + + jbosscache-cluster-name + + + +
+ + +
+ +
+ Lock manager template + + It's template name is "jbosscache-lock.xml" + + <?xml version=3D"1.0" encoding=3D"UTF-8"?> +<jbosscache xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xml= ns=3D"urn:jboss:jbosscache-core:config:3.1"> + + <locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPa= rentForChildInsertRemove=3D"false" + lockAcquisitionTimeout=3D"20000" /> + <clustering mode=3D"replication" clusterName=3D"${jbosscache-cluster= -name}"> + <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" /&= gt; + <jgroupsConfig multiplexerStack=3D"jcr.stack" /> + <sync /> + </clustering> + <loaders passivation=3D"false" shared=3D"true"> + <preload> + <node fqn=3D"/" /> + </preload> + <loader class=3D"org.jboss.cache.loader.JDBCCacheLoader" async=3D= "false" fetchPersistentState=3D"false" + ignoreModifications=3D"false" purgeOnStartup=3D"false"> + <properties> + cache.jdbc.table.name=3D${jbosscache-cl-cache.jdbc.table.name} + cache.jdbc.table.create=3D${jbosscache-cl-cache.jdbc.table.cre= ate} + cache.jdbc.table.drop=3D${jbosscache-cl-cache.jdbc.table.drop} + cache.jdbc.table.primarykey=3D${jbosscache-cl-cache.jdbc.table= .primarykey} + cache.jdbc.fqn.column=3D${jbosscache-cl-cache.jdbc.fqn.column} + cache.jdbc.fqn.type=3D${jbosscache-cl-cache.jdbc.fqn.type} + cache.jdbc.node.column=3D${jbosscache-cl-cache.jdbc.node.colum= n} + cache.jdbc.node.type=3D${jbosscache-cl-cache.jdbc.node.type} + cache.jdbc.parent.column=3D${jbosscache-cl-cache.jdbc.parent.c= olumn} + cache.jdbc.datasource=3D${jbosscache-cl-cache.jdbc.datasource} + </properties> + </loader> + </loaders> +</jbosscache> + + + Template variables + + + + + Variable + + + + + + jbosscache-cluster-name + + + + jbosscache-cl-cache.jdbc.table.name + + + + jbosscache-cl-cache.jdbc.table.create + + + + jbosscache-cl-cache.jdbc.table.drop + + + + jbosscache-cl-cache.jdbc.table.primarykey + + + + jbosscache-cl-cache.jdbc.fqn.column + + + + jbosscache-cl-cache.jdbc.fqn.type + + + + jbosscache-cl-cache.jdbc.node.column + + + + jbosscache-cl-cache.jdbc.node.type + + + + jbosscache-cl-cache.jdbc.parent.column + + + + jbosscache-cl-cache.jdbc.datasource + + + +
+
+ +
+ Query handler (indexer) template + + Have a look at "jbosscache-indexer.xml" + + <?xml version=3D"1.0" encoding=3D"UTF-8"?> +<jbosscache xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xml= ns=3D"urn:jboss:jbosscache-core:config:3.1"> + <locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPa= rentForChildInsertRemove=3D"false" + lockAcquisitionTimeout=3D"20000" /> + <clustering mode=3D"replication" clusterName=3D"${jbosscache-cluster= -name}"> + <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" /&= gt; + <jgroupsConfig multiplexerStack=3D"jcr.stack" /> + <sync /> + </clustering> + <!-- Eviction configuration --> + <eviction wakeUpInterval=3D"5000"> + <default algorithmClass=3D"org.jboss.cache.eviction.FIFOAlgorithm= " eventQueueSize=3D"1000000"> + <property name=3D"maxNodes" value=3D"10000" /> + <property name=3D"minTimeToLive" value=3D"60000" /> + </default> + </eviction> +</jbosscache> + + Template variables + + + + + Variable + + + + + + jbosscache-cluster-name + + + +
+
+
+
Property changes on: jcr/trunk/docs/reference/en/src/main/docbook/en-us/mod= ules/jbosscache-configuration-templates.xml ___________________________________________________________________ Name: svn:mime-type + text/plain --===============7229830455080032313==--