From do-not-reply at jboss.org Wed Feb 17 11:40:02 2010
Content-Type: multipart/mixed; boundary="===============7739045092398225431=="
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: r1879 -
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules.
Date: Wed, 17 Feb 2010 11:40:02 -0500
Message-ID: <201002171640.o1HGe2wJ011806@svn01.web.mwc.hst.phx2.redhat.com>
--===============7739045092398225431==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
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-confi=
g.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/cluste=
r-config.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/cluster-conf=
ig.xml 2010-02-17 16:32:39 UTC (rev 1878)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/cluster-conf=
ig.xml 2010-02-17 16:40:01 UTC (rev 1879)
@@ -1,251 +1,251 @@
-
-
-
-
- Configuring JBoss AS with eXo JCR in cluster
-
-
-
- Launching Cluster
-
-
- Deploying eXo JCR to JBoss As
-
- To deploy eXo JCR to JBoss As follow next steps:
-
-
-
- Dowload the latest version of eXo JCR ear distribution from
- [LINK THERE]
-
-
-
- Copy <jcr.ear> into
- <%jboss_home%/server/default/deploy>
-
-
-
- Put exo-configuration.xml to the root
- <%jboss_home%/exo-configuration.xml>
-
-
-
- Configure JAAS by inserting XML fragment shown below into
- <%jboss_home%/server/default/conf/login-config.xml>
-
- <application-policy name=3D"exo-domain">
- <authentication>
- <login-module code=3D"org.exoplatform.services.security.j2ee.Jbos=
sLoginModule" flag=3D"required"></login-module>
- </authentication>
-</application-policy>
-
-
-
- Start server:
-
-
-
- bin/run.sh for Unix
-
-
-
- bin/run.bat for Windows
-
-
-
-
-
- Try accessing http://localhost:8080/brow=
ser
- with root/exo as login/password if you have done everything righ=
t,
- you'll get access to repository browser.
-
-
-
-
-
- Configuring JCR to use external configuration
-
-
-
- To manually configure repository create a new configuration
- file (f.e. exo-jcr-configuration.xml). For details see JCR
- Configuration. Your configuration must look like:
-
- <repository-service default-repository=3D"rep=
ository1">
- <repositories>
- <repository name=3D"repository1" system-workspace=3D"ws1" default=
-workspace=3D"ws1">
- <security-domain>exo-domain</security-domain>
- <access-control>optional</access-control>
- <authentication-policy>org.exoplatform.services.jcr.impl.co=
re.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name=3D"ws1">
- <container class=3D"org.exoplatform.services.jcr.impl.st=
orage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
- <properties>
- <property name=3D"source-name" value=3D"jdbcjcr" /=
>
- <property name=3D"dialect" value=3D"oracle" />
- <property name=3D"multi-db" value=3D"false" />
- <property name=3D"update-storage" value=3D"false" =
/>
- <property name=3D"max-buffer-size" value=3D"200k" =
/>
- <property name=3D"swap-directory" value=3D"../temp=
/swap/production" />
- </properties>
- <value-storages>
- see "Value storage configuration" part.
- </value-storages>
- </container>
- <initializer class=3D"org.exoplatform.services.jcr.impl.=
core.ScratchWorkspaceInitializer">
- <properties>
- <property name=3D"root-nodetype" value=3D"nt:unstr=
uctured" />
- </properties>
- </initializer>
- <cache enabled=3D"true" class=3D"org.exoplatform.service=
s.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache"&=
gt;
- see "Cache configuration" part.
- </cache>
- <query-handler class=3D"org.exoplatform.services.jcr.imp=
l.core.query.lucene.SearchIndex">
- see "Indexer configuration" part.
- </query-handler>
- <lock-manager class=3D"org.exoplatform.services.jcr.impl=
.core.lock.jbosscache.CacheableLockManagerImpl">
- see "Lock Manager configuration" part.
- </lock-manager>
- </workspace>
- <workspace name=3D"ws2">
- ...
- </workspace>
- <workspace name=3D"wsN">
- ...
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service>
-
-
-
- and update RepositoryServiceConfiguration configuration in
- exo-configuration.xml to use this file:<compo=
nent>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfigu=
ration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceC=
onfigurationImpl</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>
-
-
-
-
-
-
- Requirements
-
-
- Enviorenment requirements
-
-
-
- Every node of cluster MUST have the same mounted Network F=
ile
- System with read and write permissions on it.
-
- "/mnt/tornado" - path to the mounted Network File System (=
all
- cluster nodes must use the same NFS)
-
-
-
- Every node of cluster MUST use the same database
-
-
-
- Same Clusters on different nodes MUST have the same cluster
- names (f.e if Indexer cluster in workspace production on the fir=
st
- node has name "production_indexer_cluster", then indexer cluster=
s in
- workspace production on all other nodes MUST have the same name
- "production_indexer_cluster" )
-
-
-
-
-
- Enviorenment requirements
-
- Configuration of every workspace in repository must contains of
- such parts:
-
-
-
- Value Storage configuration:
-
- <value-storages>
- <value-storage id=3D"system" class=3D"org.exoplatform.services.jcr.i=
mpl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name=3D"path" value=3D"/mnt/tornado/temp/values/prod=
uction" /> - path within NFS where ValueStorage will hold it's data
- </properties>
- <filters>
- <filter property-type=3D"Binary" />
- </filters>
- </value-storage>
-</value-storages>
-
-
-
-
-
- Cache configuration:
-
- <cache enabled=3D"true" class=3D"org.exoplatf=
orm.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceSto=
rageCache">
- <properties>
- <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-data.xml" /> - path to JBoss Cache configura=
tion for data storage
- <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> - path to JGroups configuration
- <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_c=
ache_production" /> - JBoss Cache data storage clus=
ter name
- <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
- </properties>
-</cache>
-
-
-
-
-
- Indexer configuration:
-
- <query-handler class=3D"org.exoplatform.servi=
ces.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name=3D"changesfilter-class" value=3D"org.exoplatform.s=
ervices.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
- <property name=3D"index-dir" value=3D"/mnt/tornado/temp/jcrlucene=
db/production" /> - path within NFS where Value=
Storage will hold it's data
- <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-indexer.xml" /> - path to JBoss Cache configu=
ration for indexer
- <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> - path to JGroups configurati=
on
- <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_i=
ndexer_production" /> - JBoss Cache indexer cluster=
name
- <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
- </properties>
-</query-handler>
-
-
-
- Lock Manager configuration:
-
- <lock-manager class=3D"org.exoplatform.servic=
es.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name=3D"time-out" value=3D"15m" />
- <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-lock.xml" /> - path to JBoss Cache configu=
ration for lock manager
- <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> - path to JGroups configurati=
on
- <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
- <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_l=
ock_production" /> - JBoss Cache locks cluster n=
ame
- =
- <property name=3D"jbosscache-cl-cache.jdbc.table.name" value=3D"j=
crlocks_production"/> - the name of the DB table wh=
ere lock's data will be stored
- <property name=3D"jbosscache-cl-cache.jdbc.table.create" value=3D=
"true"/>
- <property name=3D"jbosscache-cl-cache.jdbc.table.drop" value=3D"f=
alse"/>
- <property name=3D"jbosscache-cl-cache.jdbc.table.primarykey" valu=
e=3D"jcrlocks_production_pk"/>
- <property name=3D"jbosscache-cl-cache.jdbc.fqn.column" value=3D"f=
qn"/>
- <property name=3D"jbosscache-cl-cache.jdbc.node.column" value=3D"=
node"/>
- <property name=3D"jbosscache-cl-cache.jdbc.parent.column" value=
=3D"parent"/>
- <property name=3D"jbosscache-cl-cache.jdbc.datasource" value=3D"j=
dbcjcr"/>
- </properties>
-</lock-manager>
-
-
-
-
-
+
+
+
+
+ Configuring JBoss AS with eXo JCR in cluster
+
+
+
+ Launching Cluster
+
+
+ Deploying eXo JCR to JBoss As
+
+ To deploy eXo JCR to JBoss As follow next steps:
+
+
+
+ Dowload the latest version of eXo JCR ear distribution from
+ [LINK THERE]
+
+
+
+ Copy <jcr.ear> into
+ <%jboss_home%/server/default/deploy>
+
+
+
+ Put exo-configuration.xml to the root
+ <%jboss_home%/exo-configuration.xml>
+
+
+
+ Configure JAAS by inserting XML fragment shown below into
+ <%jboss_home%/server/default/conf/login-config.xml>
+
+ <application-policy name=3D"exo-domain">
+ <authentication>
+ <login-module code=3D"org.exoplatform.services.security.j2ee.Jbos=
sLoginModule" flag=3D"required"></login-module>
+ </authentication>
+</application-policy>
+
+
+
+ Start server:
+
+
+
+ bin/run.sh for Unix
+
+
+
+ bin/run.bat for Windows
+
+
+
+
+
+ Try accessing http://localhost:8080/brow=
ser
+ with root/exo as login/password if you have done everything righ=
t,
+ you'll get access to repository browser.
+
+
+
+
+
+ Configuring JCR to use external configuration
+
+
+
+ To manually configure repository create a new configuration
+ file (f.e. exo-jcr-configuration.xml). For details see JCR
+ Configuration. Your configuration must look like:
+
+ <repository-service default-repository=3D"rep=
ository1">
+ <repositories>
+ <repository name=3D"repository1" system-workspace=3D"ws1" default=
-workspace=3D"ws1">
+ <security-domain>exo-domain</security-domain>
+ <access-control>optional</access-control>
+ <authentication-policy>org.exoplatform.services.jcr.impl.co=
re.access.JAASAuthenticator</authentication-policy>
+ <workspaces>
+ <workspace name=3D"ws1">
+ <container class=3D"org.exoplatform.services.jcr.impl.st=
orage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name=3D"source-name" value=3D"jdbcjcr" /=
>
+ <property name=3D"dialect" value=3D"oracle" />
+ <property name=3D"multi-db" value=3D"false" />
+ <property name=3D"update-storage" value=3D"false" =
/>
+ <property name=3D"max-buffer-size" value=3D"200k" =
/>
+ <property name=3D"swap-directory" value=3D"../temp=
/swap/production" />
+ </properties>
+ <value-storages>
+ see "Value storage configuration" part.
+ </value-storages>
+ </container>
+ <initializer class=3D"org.exoplatform.services.jcr.impl.=
core.ScratchWorkspaceInitializer">
+ <properties>
+ <property name=3D"root-nodetype" value=3D"nt:unstr=
uctured" />
+ </properties>
+ </initializer>
+ <cache enabled=3D"true" class=3D"org.exoplatform.service=
s.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache"&=
gt;
+ see "Cache configuration" part.
+ </cache>
+ <query-handler class=3D"org.exoplatform.services.jcr.imp=
l.core.query.lucene.SearchIndex">
+ see "Indexer configuration" part.
+ </query-handler>
+ <lock-manager class=3D"org.exoplatform.services.jcr.impl=
.core.lock.jbosscache.CacheableLockManagerImpl">
+ see "Lock Manager configuration" part.
+ </lock-manager>
+ </workspace>
+ <workspace name=3D"ws2">
+ ...
+ </workspace>
+ <workspace name=3D"wsN">
+ ...
+ </workspace>
+ </workspaces>
+ </repository>
+ </repositories>
+</repository-service>
+
+
+
+ and update RepositoryServiceConfiguration configuration in
+ exo-configuration.xml to use this file:<compo=
nent>
+ <key>org.exoplatform.services.jcr.config.RepositoryServiceConfigu=
ration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceC=
onfigurationImpl</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>
+
+
+
+
+
+
+ Requirements
+
+
+ Enviorenment requirements
+
+
+
+ Every node of cluster MUST have the same mounted Network F=
ile
+ System with read and write permissions on it.
+
+ "/mnt/tornado" - path to the mounted Network File System (=
all
+ cluster nodes must use the same NFS)
+
+
+
+ Every node of cluster MUST use the same database
+
+
+
+ Same Clusters on different nodes MUST have the same cluster
+ names (f.e if Indexer cluster in workspace production on the fir=
st
+ node has name "production_indexer_cluster", then indexer cluster=
s in
+ workspace production on all other nodes MUST have the same name
+ "production_indexer_cluster" )
+
+
+
+
+
+ Enviorenment requirements
+
+ Configuration of every workspace in repository must contains of
+ such parts:
+
+
+
+ Value Storage configuration:
+
+ <value-storages>
+ <value-storage id=3D"system" class=3D"org.exoplatform.services.jcr.i=
mpl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name=3D"path" value=3D"/mnt/tornado/temp/values/prod=
uction" /> - path within NFS where ValueStorage will hold it's data
+ </properties>
+ <filters>
+ <filter property-type=3D"Binary" />
+ </filters>
+ </value-storage>
+</value-storages>
+
+
+
+
+
+ Cache configuration:
+
+ <cache enabled=3D"true" class=3D"org.exoplatf=
orm.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceSto=
rageCache">
+ <properties>
+ <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-data.xml" /> - path to JBoss Cache configura=
tion for data storage
+ <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> - path to JGroups configuration
+ <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_c=
ache_production" /> - JBoss Cache data storage clus=
ter name
+ <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
+ </properties>
+</cache>
+
+
+
+
+
+ Indexer configuration:
+
+ <query-handler class=3D"org.exoplatform.servi=
ces.jcr.impl.core.query.lucene.SearchIndex">
+ <properties>
+ <property name=3D"changesfilter-class" value=3D"org.exoplatform.s=
ervices.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
+ <property name=3D"index-dir" value=3D"/mnt/tornado/temp/jcrlucene=
db/production" /> - path within NFS where Value=
Storage will hold it's data
+ <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-indexer.xml" /> - path to JBoss Cache configu=
ration for indexer
+ <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> - path to JGroups configurati=
on
+ <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_i=
ndexer_production" /> - JBoss Cache indexer cluster=
name
+ <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
+ </properties>
+</query-handler>
+
+
+
+ Lock Manager configuration:
+
+ <lock-manager class=3D"org.exoplatform.servic=
es.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <properties>
+ <property name=3D"time-out" value=3D"15m" />
+ <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-lock.xml" /> - path to JBoss Cache configu=
ration for lock manager
+ <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> - path to JGroups configurati=
on
+ <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
+ <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_l=
ock_production" /> - JBoss Cache locks cluster n=
ame
+ =
+ <property name=3D"jbosscache-cl-cache.jdbc.table.name" value=3D"j=
crlocks_production"/> - the name of the DB table wh=
ere lock's data will be stored
+ <property name=3D"jbosscache-cl-cache.jdbc.table.create" value=3D=
"true"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.table.drop" value=3D"f=
alse"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.table.primarykey" valu=
e=3D"jcrlocks_production_pk"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.fqn.column" value=3D"f=
qn"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.node.column" value=3D"=
node"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.parent.column" value=
=3D"parent"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.datasource" value=3D"j=
dbcjcr"/>
+ </properties>
+</lock-manager>
+
+
+
+
+
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/lock-m=
anager-config.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/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 @@
-
-
-
-
- LockManager configuration
-
-
-
- Introduction
-
- What LockManager does?
-
- In common words, LockManager stores lock objects, so it can give
- Lock object or can release it, etc.
-
- Also LockManager is responsible for removing Locks that live too
- long. This parameter may be configured with "time-out" property.
-
- JCR provide two base implementation of LockManager:
-
-
-
- org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;=
-
-
-
- org.exoplatform.services.jcr.impl.core.lock.jbosscache.Cache=
ableLockManagerImpl;
-
-
-
- In this article we will talk mostly about
- CacheableLockManagerImpl.
-
- You can enable LockManager by adding lock-manager-configuration =
to
- workspace-configuration.
-
- For example:
-
- <workspace name=3D"ws">
- ...
- <lock-manager class=3D"org.exoplatform.services.jcr.impl.core.lock.j=
bosscache.CacheableLockManagerImpl">
- <properties>
- <property name=3D"time-out" value=3D"15m" />
- ...
- </properties>
- </lock-manager> =
- ...
-</workspace>
-
-
-
- LockManagerImpl
-
- 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.
-
- See LockManagerImpl
- configuration
-
-
-
- CacheableLockManagerImpl
-
- CacheableLockManagerImpl stores Lock object in JBoss-cache, so L=
ocks
- are replicable and affects on cluster, not only a single node. Also
- JBoss-cache has JDBCCacheLoader, so locks will be stored to
- database.
-
- Both implementation supports Expired Locks removing. There is
- LockRemover - separate thread, that periodically ask LockManager for L=
ocks
- that lives to much and must be removed. So, timeout for LockRemover ma=
y be
- set as follows, default value is 30m.
-
- <properties>
- <property name=3D"time-out" value=3D"10m" />
- ...
-</properties>
-
- Replication requirements are same as for Cache
-
-
- [TODO add link to replication configuration]
-
-
-
- Configuration
-
- Replication requirements are same as for Cache
-
- Common tips:
-
-
-
- clusterName ("jbosscache-cluster-name") must be unique;
-
-
-
- cache.jdbc.table.name must be unique per datasource;
-
-
-
- cache.jdbc.fqn.type must and cache.jdbc.node.type must be
- configured according to used database;
-
-
-
- There is few ways how to configure CacheableLockManagerImpl, a=
nd
- all of them configures JBoss-cache and JDBCCacheLoader.
-
- See ht=
tp://community.jboss.org/wiki/JBossCacheJDBCCacheLoader
-
-
-
- Simple JbossCache Configuraion
-
- First one is - put JbossCache configuraion file path to
- CacheableLockManagerImpl
-
-
- This configuration is not so good, as you can think. Becau=
se
- 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 speci=
al
- configuration.
-
-
- Config is:
-
- <lock-manager class=3D"org.exoplatform.services.j=
cr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name=3D"time-out" value=3D"15m" />
- <property name=3D"jbosscache-configuration" value=3D"conf/standalo=
ne/cluster/test-jbosscache-lock-config.xml" />
- </properties>
-</lock-manager>
-
- test-jbosscache-lock-config.xml<?xml versio=
n=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.2">
-
- <locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPare=
ntForChildInsertRemove=3D"false" lockAcquisitionTimeout=3D"20000" />
-
- <clustering mode=3D"replication" clusterName=3D"JBoss-Cache-Lock-Clust=
er_Name">
- <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" nonBlo=
cking=3D"true" />
- <jgroupsConfig>
-
- <TCP bind_addr=3D"127.0.0.1" start_port=3D"9800" loopback=3D"true" r=
ecv_buf_size=3D"20000000" send_buf_size=3D"640000" discard_incompatible_pac=
kets=3D"true"
- max_bundle_size=3D"64000" max_bundle_timeout=3D"30" use_incoming_packe=
t_handler=3D"true" enable_bundling=3D"false" use_send_queues=3D"false" sock=
_conn_timeout=3D"300"
- skip_suspected_members=3D"true" use_concurrent_stack=3D"true" thread_p=
ool.enabled=3D"true" thread_pool.min_threads=3D"1" thread_pool.max_threads=
=3D"25"
- thread_pool.keep_alive_time=3D"5000" thread_pool.queue_enabled=3D"fals=
e" thread_pool.queue_max_size=3D"100" thread_pool.rejection_policy=3D"run"
- oob_thread_pool.enabled=3D"true" oob_thread_pool.min_threads=3D"1" oob=
_thread_pool.max_threads=3D"8" oob_thread_pool.keep_alive_time=3D"5000"
- oob_thread_pool.queue_enabled=3D"false" oob_thread_pool.queue_max_size=
=3D"100" oob_thread_pool.rejection_policy=3D"run" />
- <MPING timeout=3D"2000" num_initial_members=3D"2" mcast_port=3D"3454=
0" bind_addr=3D"127.0.0.1" mcast_addr=3D"224.0.0.1" />
-
-
- <MERGE2 max_interval=3D"30000" min_interval=3D"10000" />
- <FD_SOCK />
- <FD max_tries=3D"5" shun=3D"true" timeout=3D"10000" />
- <VERIFY_SUSPECT timeout=3D"1500" />
- <pbcast.NAKACK discard_delivered_msgs=3D"true" gc_lag=3D"0" retransm=
it_timeout=3D"300,600,1200,2400,4800" use_mcast_xmit=3D"false" />
- <UNICAST timeout=3D"300,600,1200,2400,3600" />
- <pbcast.STABLE desired_avg_gossip=3D"50000" max_bytes=3D"400000" sta=
bility_delay=3D"1000" />
- <pbcast.GMS join_timeout=3D"5000" print_local_addr=3D"true" shun=3D"=
false" view_ack_collection_timeout=3D"5000" view_bundling=3D"true" />
- <FRAG2 frag_size=3D"60000" />
- <pbcast.STREAMING_STATE_TRANSFER />
- <pbcast.FLUSH timeout=3D"0" />
-
- </jgroupsConfig
-
- <sync />
- </clustering>
-
- <loaders passivation=3D"false" shared=3D"true">
- <preload>
- <node fqn=3D"/" />
- </preload>
- <loader class=3D"org.jboss.cache.loader.JDBCCacheLoader" async=3D"fal=
se" fetchPersistentState=3D"false" ignoreModifications=3D"false" purgeOnSta=
rtup=3D"false">
- <properties>
- cache.jdbc.table.name=3Djcrlocks_ws
- cache.jdbc.table.create=3Dtrue
- cache.jdbc.table.drop=3Dfalse
- cache.jdbc.table.primarykey=3Djcrlocks_ws_pk
- cache.jdbc.fqn.column=3Dfqn
- cache.jdbc.fqn.type=3DVARCHAR(512)
- cache.jdbc.node.column=3Dnode
- cache.jdbc.node.type=3D<BLOB> =
- cache.jdbc.parent.column=3Dparent
- cache.jdbc.datasource=3Djdbcjcr
- </properties>
- </loader>
-
- </loaders>
-
-</jbosscache>
-
- Configuration requirements:
-
-
-
- <clustering mode=3D"replication"
- clusterName=3D"JBoss-Cache-Lock-Cluster_Name"> - cluster name=
must
- be unique;
-
-
-
- cache.jdbc.table.name
must be unique per
- datasource;
-
-
-
- cache.jdbc.node.type
and
- cache.jdbc.fqn.type
must be configured according =
to
- using database. See .
-
-
-
-
-
- Template JBossCache Configuration
-
- Second one is - use template JBoss-cache configuration for all
- LockManagers
-
- Lock template configuration
-
- test-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">
- <!-- All the data of the JCR locks needs to be loaded at startup =
-->
- <preload>
- <node fqn=3D"/" />
- </preload> =
- <!--
- For another cache-loader class you should use another template with
- cache-loader specific parameters
- ->
- <loader class=3D"org.jboss.cache.loader.JDBCCacheLoader" async=3D=
q"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>
-
- As you see, all configurable paramaters filled by templates and
- will be replaced by LockManagers conf parameters:
-
- <lock-manager class=3D"org.exoplatform.services.j=
cr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name=3D"time-out" value=3D"15m" />
- <property name=3D"jbosscache-configuration" value=3D"test-jbossca=
che-lock.xml" />
- <property name=3D"jgroups-configuration" value=3D"udp-mux.xml" /&=
gt;
- <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
- <property name=3D"jbosscache-cluster-name" value=3D"JCR-cluster-l=
ocks-ws" />
- <property name=3D"jbosscache-cl-cache.jdbc.table.name" value=3D"j=
crlocks_ws" />
- <property name=3D"jbosscache-cl-cache.jdbc.table.create" value=3D=
"true" />
- <property name=3D"jbosscache-cl-cache.jdbc.table.drop" value=3D"f=
alse" />
- <property name=3D"jbosscache-cl-cache.jdbc.table.primarykey" valu=
e=3D"jcrlocks_ws_pk" />
- <property name=3D"jbosscache-cl-cache.jdbc.fqn.column" value=3D"f=
qn" />
- <property name=3D"jbosscache-cl-cache.jdbc.fqn.type" value=3D"AUT=
O"/>
- <property name=3D"jbosscache-cl-cache.jdbc.node.column" value=3D"=
node" />
- <property name=3D"jbosscache-cl-cache.jdbc.node.type" value=3D"AU=
TO"/>
- <property name=3D"jbosscache-cl-cache.jdbc.parent.column" value=
=3D"parent" />
- <property name=3D"jbosscache-cl-cache.jdbc.datasource" value=3D"j=
dbcjcr" />
- </properties>
-</lock-manager>
-
- Configuration requirements:
-
- jbosscache-cl-cache.jdbc.fqn.column
and
- jbosscache-cl-cache.jdbc.node.type
is nothing e=
lse
- as cache.jdbc.fqn.type and cache.jdbc.node.type in JBoss-Cache
- configuration. You can set those data types according to datab=
ase
- type (See ) or set it as
- AUTO (or do not set at all) and data type will by detected
- automaticaly.
-
-
-
- as you see, jgroups-configuration moved to separate conf=
ig
- 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.
-
-
-
- our-udp-mux.xml<protocol_stacks>
- <stack name=3D"jcr.stack">
- <config>
- <UDP mcast_addr=3D"228.10.10.10" mcast_port=3D"45588" tos=3D"8=
" ucast_recv_buf_size=3D"20000000"
- ucast_send_buf_size=3D"640000" mcast_recv_buf_size=3D"25000000=
" mcast_send_buf_size=3D"640000" loopback=3D"false"
- discard_incompatible_packets=3D"true" max_bundle_size=3D"64000=
" max_bundle_timeout=3D"30"
- use_incoming_packet_handler=3D"true" ip_ttl=3D"2" enable_bundl=
ing=3D"true" enable_diagnostics=3D"true"
- thread_naming_pattern=3D"cl" use_concurrent_stack=3D"true" thr=
ead_pool.enabled=3D"true" thread_pool.min_threads=3D"2"
- thread_pool.max_threads=3D"8" thread_pool.keep_alive_time=3D"5=
000" thread_pool.queue_enabled=3D"true"
- thread_pool.queue_max_size=3D"1000" thread_pool.rejection_poli=
cy=3D"discard" oob_thread_pool.enabled=3D"true"
- oob_thread_pool.min_threads=3D"1" oob_thread_pool.max_threads=
=3D"8" oob_thread_pool.keep_alive_time=3D"5000"
- oob_thread_pool.queue_enabled=3D"false" oob_thread_pool.queue_=
max_size=3D"100" oob_thread_pool.rejection_policy=3D"Run" />
-
- <PING timeout=3D"2000" num_initial_members=3D"3" />
- <MERGE2 max_interval=3D"30000" min_interval=3D"10000" />
- <FD_SOCK />
- <FD timeout=3D"10000" max_tries=3D"5" shun=3D"true" />
- <VERIFY_SUSPECT timeout=3D"1500" />
- <BARRIER />
- <pbcast.NAKACK use_stats_for_retransmission=3D"false" exponent=
ial_backoff=3D"150" use_mcast_xmit=3D"true"
- gc_lag=3D"0" retransmit_timeout=3D"50,300,600,1200" discard_de=
livered_msgs=3D"true" />
- <UNICAST timeout=3D"300,600,1200" />
- <pbcast.STABLE stability_delay=3D"1000" desired_avg_gossip=3D"=
50000" max_bytes=3D"1000000" />
- <VIEW_SYNC avg_send_interval=3D"60000" />
- <pbcast.GMS print_local_addr=3D"true" join_timeout=3D"3000" sh=
un=3D"false" view_bundling=3D"true" />
- <FC max_credits=3D"500000" min_threshold=3D"0.20" />
- <FRAG2 frag_size=3D"60000" />
- <!--pbcast.STREAMING_STATE_TRANSFER /-->
- <pbcast.STATE_TRANSFER />
- <!-- pbcast.FLUSH /-->
- </config>
- </stack>
-</protocol_stacks>
-
-
-
- Data Types in Different Databases
-
-
- Fqn type and node type in different databases
-
-
-
-
- DataBase name
-
- Node data type
-
- FQN data type
-
-
-
-
-
- default
-
- BLOB
-
- VARCHAR(512)
-
-
-
- HSSQL
-
- OBJECT
-
- VARCHAR(512)
-
-
-
- MySQL
-
- LONGBLOB
-
- VARCHAR(512)
-
-
-
- ORACLE
-
- BLOB
-
- VARCHAR2(512)
-
-
-
- PostgreSQL
-
- bytea
-
- VARCHAR(512)
-
-
-
- MSSQL
-
- VARBINARY(MAX)
-
- VARCHAR(512)
-
-
-
- DB2
-
- BLOB
-
- VARCHAR(512)
-
-
-
- Sybase
-
- IMAGE
-
- VARCHAR(512)
-
-
-
- Ingres
-
- long byte
-
- VARCHAR(512)
-
-
-
-
-
-
-
+
+
+
+
+ LockManager configuration
+
+
+
+ Introduction
+
+ What LockManager does?
+
+ In common words, LockManager stores lock objects, so it can give
+ Lock object or can release it, etc.
+
+ Also LockManager is responsible for removing Locks that live too
+ long. This parameter may be configured with "time-out" property.
+
+ JCR provide two base implementation of LockManager:
+
+
+
+ org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl;=
+
+
+
+ org.exoplatform.services.jcr.impl.core.lock.jbosscache.Cache=
ableLockManagerImpl;
+
+
+
+ In this article we will talk mostly about
+ CacheableLockManagerImpl.
+
+ You can enable LockManager by adding lock-manager-configuration =
to
+ workspace-configuration.
+
+ For example:
+
+ <workspace name=3D"ws">
+ ...
+ <lock-manager class=3D"org.exoplatform.services.jcr.impl.core.lock.j=
bosscache.CacheableLockManagerImpl">
+ <properties>
+ <property name=3D"time-out" value=3D"15m" />
+ ...
+ </properties>
+ </lock-manager> =
+ ...
+</workspace>
+
+
+
+ LockManagerImpl
+
+ 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.
+
+ See LockManagerImpl
+ configuration
+
+
+
+ CacheableLockManagerImpl
+
+ CacheableLockManagerImpl stores Lock object in JBoss-cache, so L=
ocks
+ are replicable and affects on cluster, not only a single node. Also
+ JBoss-cache has JDBCCacheLoader, so locks will be stored to
+ database.
+
+ Both implementation supports Expired Locks removing. There is
+ LockRemover - separate thread, that periodically ask LockManager for L=
ocks
+ that lives to much and must be removed. So, timeout for LockRemover ma=
y be
+ set as follows, default value is 30m.
+
+ <properties>
+ <property name=3D"time-out" value=3D"10m" />
+ ...
+</properties>
+
+
+ Configuration
+
+ Replication requirements are same as for Cache
+
+ Common tips:
+
+
+
+ clusterName ("jbosscache-cluster-name") must be unique;
+
+
+
+ cache.jdbc.table.name must be unique per datasource;
+
+
+
+ cache.jdbc.fqn.type must and cache.jdbc.node.type must be
+ configured according to used database;
+
+
+
+ There is few ways how to configure CacheableLockManagerImpl, a=
nd
+ all of them configures JBoss-cache and JDBCCacheLoader.
+
+ See ht=
tp://community.jboss.org/wiki/JBossCacheJDBCCacheLoader
+
+
+
+ Simple JbossCache Configuraion
+
+ First one is - put JbossCache configuraion file path to
+ CacheableLockManagerImpl
+
+
+ This configuration is not so good, as you can think. Becau=
se
+ 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 speci=
al
+ configuration.
+
+
+ Config is:
+
+ <lock-manager class=3D"org.exoplatform.services.j=
cr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <properties>
+ <property name=3D"time-out" value=3D"15m" />
+ <property name=3D"jbosscache-configuration" value=3D"conf/standalo=
ne/cluster/test-jbosscache-lock-config.xml" />
+ </properties>
+</lock-manager>
+
+ test-jbosscache-lock-config.xml<?xml versio=
n=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.2">
+
+ <locking useLockStriping=3D"false" concurrencyLevel=3D"50000" lockPare=
ntForChildInsertRemove=3D"false" lockAcquisitionTimeout=3D"20000" />
+
+ <clustering mode=3D"replication" clusterName=3D"JBoss-Cache-Lock-Clust=
er_Name">
+ <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" nonBlo=
cking=3D"true" />
+ <jgroupsConfig>
+
+ <TCP bind_addr=3D"127.0.0.1" start_port=3D"9800" loopback=3D"true" r=
ecv_buf_size=3D"20000000" send_buf_size=3D"640000" discard_incompatible_pac=
kets=3D"true"
+ max_bundle_size=3D"64000" max_bundle_timeout=3D"30" use_incoming_packe=
t_handler=3D"true" enable_bundling=3D"false" use_send_queues=3D"false" sock=
_conn_timeout=3D"300"
+ skip_suspected_members=3D"true" use_concurrent_stack=3D"true" thread_p=
ool.enabled=3D"true" thread_pool.min_threads=3D"1" thread_pool.max_threads=
=3D"25"
+ thread_pool.keep_alive_time=3D"5000" thread_pool.queue_enabled=3D"fals=
e" thread_pool.queue_max_size=3D"100" thread_pool.rejection_policy=3D"run"
+ oob_thread_pool.enabled=3D"true" oob_thread_pool.min_threads=3D"1" oob=
_thread_pool.max_threads=3D"8" oob_thread_pool.keep_alive_time=3D"5000"
+ oob_thread_pool.queue_enabled=3D"false" oob_thread_pool.queue_max_size=
=3D"100" oob_thread_pool.rejection_policy=3D"run" />
+ <MPING timeout=3D"2000" num_initial_members=3D"2" mcast_port=3D"3454=
0" bind_addr=3D"127.0.0.1" mcast_addr=3D"224.0.0.1" />
+
+
+ <MERGE2 max_interval=3D"30000" min_interval=3D"10000" />
+ <FD_SOCK />
+ <FD max_tries=3D"5" shun=3D"true" timeout=3D"10000" />
+ <VERIFY_SUSPECT timeout=3D"1500" />
+ <pbcast.NAKACK discard_delivered_msgs=3D"true" gc_lag=3D"0" retransm=
it_timeout=3D"300,600,1200,2400,4800" use_mcast_xmit=3D"false" />
+ <UNICAST timeout=3D"300,600,1200,2400,3600" />
+ <pbcast.STABLE desired_avg_gossip=3D"50000" max_bytes=3D"400000" sta=
bility_delay=3D"1000" />
+ <pbcast.GMS join_timeout=3D"5000" print_local_addr=3D"true" shun=3D"=
false" view_ack_collection_timeout=3D"5000" view_bundling=3D"true" />
+ <FRAG2 frag_size=3D"60000" />
+ <pbcast.STREAMING_STATE_TRANSFER />
+ <pbcast.FLUSH timeout=3D"0" />
+
+ </jgroupsConfig
+
+ <sync />
+ </clustering>
+
+ <loaders passivation=3D"false" shared=3D"true">
+ <preload>
+ <node fqn=3D"/" />
+ </preload>
+ <loader class=3D"org.jboss.cache.loader.JDBCCacheLoader" async=3D"fal=
se" fetchPersistentState=3D"false" ignoreModifications=3D"false" purgeOnSta=
rtup=3D"false">
+ <properties>
+ cache.jdbc.table.name=3Djcrlocks_ws
+ cache.jdbc.table.create=3Dtrue
+ cache.jdbc.table.drop=3Dfalse
+ cache.jdbc.table.primarykey=3Djcrlocks_ws_pk
+ cache.jdbc.fqn.column=3Dfqn
+ cache.jdbc.fqn.type=3DVARCHAR(512)
+ cache.jdbc.node.column=3Dnode
+ cache.jdbc.node.type=3D<BLOB> =
+ cache.jdbc.parent.column=3Dparent
+ cache.jdbc.datasource=3Djdbcjcr
+ </properties>
+ </loader>
+
+ </loaders>
+
+</jbosscache>
+
+ Configuration requirements:
+
+
+
+ <clustering mode=3D"replication"
+ clusterName=3D"JBoss-Cache-Lock-Cluster_Name"> - cluster name=
must
+ be unique;
+
+
+
+ cache.jdbc.table.name
must be unique per
+ datasource;
+
+
+
+ cache.jdbc.node.type
and
+ cache.jdbc.fqn.type
must be configured according =
to
+ using database. See .
+
+
+
+
+
+ Template JBossCache Configuration
+
+ Second one is - use template JBoss-cache configuration for all
+ LockManagers
+
+ Lock template configuration
+
+ test-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">
+ <!-- All the data of the JCR locks needs to be loaded at startup =
-->
+ <preload>
+ <node fqn=3D"/" />
+ </preload> =
+ <!--
+ For another cache-loader class you should use another template with
+ cache-loader specific parameters
+ ->
+ <loader class=3D"org.jboss.cache.loader.JDBCCacheLoader" async=3D=
q"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>
+
+ As you see, all configurable paramaters filled by templates and
+ will be replaced by LockManagers conf parameters:
+
+ <lock-manager class=3D"org.exoplatform.services.j=
cr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <properties>
+ <property name=3D"time-out" value=3D"15m" />
+ <property name=3D"jbosscache-configuration" value=3D"test-jbossca=
che-lock.xml" />
+ <property name=3D"jgroups-configuration" value=3D"udp-mux.xml" /&=
gt;
+ <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
+ <property name=3D"jbosscache-cluster-name" value=3D"JCR-cluster-l=
ocks-ws" />
+ <property name=3D"jbosscache-cl-cache.jdbc.table.name" value=3D"j=
crlocks_ws" />
+ <property name=3D"jbosscache-cl-cache.jdbc.table.create" value=3D=
"true" />
+ <property name=3D"jbosscache-cl-cache.jdbc.table.drop" value=3D"f=
alse" />
+ <property name=3D"jbosscache-cl-cache.jdbc.table.primarykey" valu=
e=3D"jcrlocks_ws_pk" />
+ <property name=3D"jbosscache-cl-cache.jdbc.fqn.column" value=3D"f=
qn" />
+ <property name=3D"jbosscache-cl-cache.jdbc.fqn.type" value=3D"AUT=
O"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.node.column" value=3D"=
node" />
+ <property name=3D"jbosscache-cl-cache.jdbc.node.type" value=3D"AU=
TO"/>
+ <property name=3D"jbosscache-cl-cache.jdbc.parent.column" value=
=3D"parent" />
+ <property name=3D"jbosscache-cl-cache.jdbc.datasource" value=3D"j=
dbcjcr" />
+ </properties>
+</lock-manager>
+
+ Configuration requirements:
+
+ jbosscache-cl-cache.jdbc.fqn.column
and
+ jbosscache-cl-cache.jdbc.node.type
is nothing e=
lse
+ as cache.jdbc.fqn.type and cache.jdbc.node.type in JBoss-Cache
+ configuration. You can set those data types according to datab=
ase
+ type (See ) or set it as AUTO (or do not se=
t at
+ all) and data type will by detected automaticaly.
+
+
+
+ as you see, jgroups-configuration moved to separate conf=
ig
+ 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.
+
+
+
+ our-udp-mux.xml<protocol_stacks>
+ <stack name=3D"jcr.stack">
+ <config>
+ <UDP mcast_addr=3D"228.10.10.10" mcast_port=3D"45588" tos=3D"8=
" ucast_recv_buf_size=3D"20000000"
+ ucast_send_buf_size=3D"640000" mcast_recv_buf_size=3D"25000000=
" mcast_send_buf_size=3D"640000" loopback=3D"false"
+ discard_incompatible_packets=3D"true" max_bundle_size=3D"64000=
" max_bundle_timeout=3D"30"
+ use_incoming_packet_handler=3D"true" ip_ttl=3D"2" enable_bundl=
ing=3D"true" enable_diagnostics=3D"true"
+ thread_naming_pattern=3D"cl" use_concurrent_stack=3D"true" thr=
ead_pool.enabled=3D"true" thread_pool.min_threads=3D"2"
+ thread_pool.max_threads=3D"8" thread_pool.keep_alive_time=3D"5=
000" thread_pool.queue_enabled=3D"true"
+ thread_pool.queue_max_size=3D"1000" thread_pool.rejection_poli=
cy=3D"discard" oob_thread_pool.enabled=3D"true"
+ oob_thread_pool.min_threads=3D"1" oob_thread_pool.max_threads=
=3D"8" oob_thread_pool.keep_alive_time=3D"5000"
+ oob_thread_pool.queue_enabled=3D"false" oob_thread_pool.queue_=
max_size=3D"100" oob_thread_pool.rejection_policy=3D"Run" />
+
+ <PING timeout=3D"2000" num_initial_members=3D"3" />
+ <MERGE2 max_interval=3D"30000" min_interval=3D"10000" />
+ <FD_SOCK />
+ <FD timeout=3D"10000" max_tries=3D"5" shun=3D"true" />
+ <VERIFY_SUSPECT timeout=3D"1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission=3D"false" exponent=
ial_backoff=3D"150" use_mcast_xmit=3D"true"
+ gc_lag=3D"0" retransmit_timeout=3D"50,300,600,1200" discard_de=
livered_msgs=3D"true" />
+ <UNICAST timeout=3D"300,600,1200" />
+ <pbcast.STABLE stability_delay=3D"1000" desired_avg_gossip=3D"=
50000" max_bytes=3D"1000000" />
+ <VIEW_SYNC avg_send_interval=3D"60000" />
+ <pbcast.GMS print_local_addr=3D"true" join_timeout=3D"3000" sh=
un=3D"false" view_bundling=3D"true" />
+ <FC max_credits=3D"500000" min_threshold=3D"0.20" />
+ <FRAG2 frag_size=3D"60000" />
+ <!--pbcast.STREAMING_STATE_TRANSFER /-->
+ <pbcast.STATE_TRANSFER />
+ <!-- pbcast.FLUSH /-->
+ </config>
+ </stack>
+</protocol_stacks>
+
+
+
+ Data Types in Different Databases
+
+
+ Fqn type and node type in different databases
+
+
+
+
+ DataBase name
+
+ Node data type
+
+ FQN data type
+
+
+
+
+
+ default
+
+ BLOB
+
+ VARCHAR(512)
+
+
+
+ HSSQL
+
+ OBJECT
+
+ VARCHAR(512)
+
+
+
+ MySQL
+
+ LONGBLOB
+
+ VARCHAR(512)
+
+
+
+ ORACLE
+
+ BLOB
+
+ VARCHAR2(512)
+
+
+
+ PostgreSQL
+
+ bytea
+
+ VARCHAR(512)
+
+
+
+ MSSQL
+
+ VARBINARY(MAX)
+
+ VARCHAR(512)
+
+
+
+ DB2
+
+ BLOB
+
+ VARCHAR(512)
+
+
+
+ Sybase
+
+ IMAGE
+
+ VARCHAR(512)
+
+
+
+ Ingres
+
+ long byte
+
+ VARCHAR(512)
+
+
+
+
+
+
+
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-=
handler-config.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/query-handle=
r-config.xml 2010-02-17 16:32:39 UTC (rev 1878)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handle=
r-config.xml 2010-02-17 16:40:01 UTC (rev 1879)
@@ -1,12 +1,12 @@
-
+
QueryHandler configuration
=
-
+
How does it work?
=
Lets talk about indexing content in cluster.
@@ -51,12 +51,12 @@
-
+
=
-
+
Configuration
=
-
+
Common requirements
=
Now, lets see what we need to run Search engine in cluster
@@ -79,9 +79,9 @@
configure JBoss-cache, course;
-
+
=
-
+
Query-handler configuration
=
Configuration example:<workspace name=3D"ws=
">
@@ -152,9 +152,9 @@
-
+
=
-
+
JBoss-Cache template configuration
=
JBoss-Cache template configuration for query handler.
@@ -181,6 +181,6 @@
</eviction>
=
</jbosscache>
-
-
+
+
--===============7739045092398225431==--