From do-not-reply at jboss.org Thu Feb 18 10:38:57 2010
Content-Type: multipart/mixed; boundary="===============2699168249641228460=="
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: r1904 -
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules.
Date: Thu, 18 Feb 2010 10:38:57 -0500
Message-ID: <201002181538.o1IFcv0p017601@svn01.web.mwc.hst.phx2.redhat.com>
--===============2699168249641228460==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: sergiykarpenko
Date: 2010-02-18 10:38:57 -0500 (Thu, 18 Feb 2010)
New Revision: 1904
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/intro.xml
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jbosscache-co=
nfiguration-templates.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: links added
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-18 15:27:16 UTC (rev 1903)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/cluster-conf=
ig.xml 2010-02-18 15:38:57 UTC (rev 1904)
@@ -1,247 +1,262 @@
-
-
-
-
-
- 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 stora=
ge 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 configuratio=
n" part.
- </cache>
- <query-handler class=3D"org.exoplatform.services.jcr.imp=
l.core.query.lucene.SearchIndex">
- see "Indexer configurati=
on" part.
- </query-handler>
- <lock-manager class=3D"org.exoplatform.services.jcr.impl=
.core.lock.jbosscache.CacheableLockManagerImpl">
- see "Lock Manager c=
onfiguration" 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 d=
ata-->
- </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 con=
figuration for data storage -->
- <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> <!-- path to JGroups configu=
ration -->
- <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_c=
ache_production" /> <!-- JBoss Cache data storag=
e cluster 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=
ValueStorage will hold it's data -->
- <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache c=
onfiguration for indexer -->
- <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> <!-- path to JGroups confi=
guration -->
- <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_i=
ndexer_production" /> <!-- JBoss Cache indexer c=
luster 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 c=
onfiguration for lock manager -->
- <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> <!-- path to JGroups confi=
guration -->
- <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 clu=
ster name -->
- =
- <property name=3D"jbosscache-cl-cache.jdbc.table.name" value=3D"j=
crlocks_production"/> <!-- the name of the DB ta=
ble where 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/browser with
+ root/exo as login/password if you have done everything right, yo=
u'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 stora=
ge 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 configuratio=
n" part.
+ </cache>
+ <query-handler class=3D"org.exoplatform.services.jcr.imp=
l.core.query.lucene.SearchIndex">
+ see "Indexer configurati=
on" part.
+ </query-handler>
+ <lock-manager class=3D"org.exoplatform.services.jcr.impl=
.core.lock.jbosscache.CacheableLockManagerImpl">
+ see "Lock Manager c=
onfiguration" 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 d=
ata-->
+ </properties>
+ <filters>
+ <filter property-type=3D"Binary" />
+ </filters>
+ </value-storage>
+</value-storages>
+
+ See more about ValueStorage
+ configuration.
+
+
+
+ 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 con=
figuration for data storage -->
+ <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> <!-- path to JGroups configu=
ration -->
+ <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_c=
ache_production" /> <!-- JBoss Cache data storag=
e cluster name -->
+ <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
+ </properties>
+</cache>
+
+ See more about Cache
+ configuration.
+
+
+
+ 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=
ValueStorage will hold it's data -->
+ <property name=3D"jbosscache-configuration" value=3D"jar:/conf/po=
rtal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache c=
onfiguration for indexer -->
+ <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> <!-- path to JGroups confi=
guration -->
+ <property name=3D"jbosscache-cluster-name" value=3D"JCR_Cluster_i=
ndexer_production" /> <!-- JBoss Cache indexer c=
luster name -->
+ <property name=3D"jgroups-multiplexer-stack" value=3D"true" />
+ </properties>
+</query-handler>
+
+ See more about QueryHandler
+ configuration.
+
+
+
+ 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 c=
onfiguration for lock manager -->
+ <property name=3D"jgroups-configuration" value=3D"jar:/conf/porta=
l/udp-mux.xml" /> <!-- path to JGroups confi=
guration -->
+ <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 clu=
ster name -->
+ =
+ <property name=3D"jbosscache-cl-cache.jdbc.table.name" value=3D"j=
crlocks_production"/> <!-- the name of the DB ta=
ble where 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>
+
+ See more about LockManager
+ configuration.
+
+
+
+
+
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/intro.=
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/intro.xml 20=
10-02-18 15:27:16 UTC (rev 1903)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/intro.xml 20=
10-02-18 15:38:57 UTC (rev 1904)
@@ -1,70 +1,70 @@
-
-
-
-
- Introduction in eXoJCR
-
- JCR (JSR-170) API main concepts
-
- Java Content Repository API as well as other Java language relat=
ed
- standards is created within the Java Community Process http://jcp.org/=
as
- a result of collaboration of an expert group and the Java community and
- known as JSR-170 (Java Specification Request)
- http://www.jcp.org/en/jsr/detail?id=3D170.
-
-
-
-
- Data model
-
- As the main purpose of content repository is to maintain the d=
ata
- - the heart of CR is the data model:
-
-
-
- The main data storage abstraction of JCR's data model is=
a
- workspace
-
-
-
- Each repository should have one or more workspaces
-
-
-
- The content is stored in a workspace as a hierarchy of
- items
-
-
-
- Each workspace has its own hierarchy of items
-
-
-
-
- Item hierarchy
-
-
-
-
-
-
-
-
- Node is intended to support the data hierarchy. They are typed
- using namespaced names which allows the content to be structured
- according to standardized constraints. A node may be versioned throu=
gh
- an associated version graph (optional feature)
-
- Property stored data are values of predefined types (String,
- Binary, Long, Boolean, Double, Date, Reference, Path).
-
- It is important to note that the data model for the interface =
(the
- repository model) is rarely the same as the data models used by the
- repository's underlying storage subsystems. The repository knows how=
to
- make the client's changes persistent because that is part of the
- repository configuration, rather than part of the application
- programming task.
-
-
-
+
+
+
+
+
+ Introduction in eXoJCR
+
+
+ JCR (JSR-170) API main concepts
+
+ Java Content Repository API as well as other Java language relat=
ed
+ standards is created within the Java Community Process http://jcp.org/=
as
+ a result of collaboration of an expert group and the Java community and
+ known as JSR-170 (Java Specification Request)
+ http://www.jcp.org/en/jsr/detail?id=3D170.
+
+
+ Data model
+
+ As the main purpose of content repository is to maintain the d=
ata
+ - the heart of CR is the data model:
+
+
+
+ The main data storage abstraction of JCR's data model is=
a
+ workspace
+
+
+
+ Each repository should have one or more workspaces
+
+
+
+ The content is stored in a workspace as a hierarchy of
+ items
+
+
+
+ Each workspace has its own hierarchy of items
+
+
+
+
+ Item hierarchy
+
+
+
+
+
+
+
+
+ Node is intended to support the data hierarchy. They are typed
+ using namespaced names which allows the content to be structured
+ according to standardized constraints. A node may be versioned throu=
gh
+ an associated version graph (optional feature)
+
+ Property stored data are values of predefined types (String,
+ Binary, Long, Boolean, Double, Date, Reference, Path).
+
+ It is important to note that the data model for the interface =
(the
+ repository model) is rarely the same as the data models used by the
+ repository's underlying storage subsystems. The repository knows how=
to
+ make the client's changes persistent because that is part of the
+ repository configuration, rather than part of the application
+ programming task.
+
+
+
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jbossc=
ache-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 2010-02-18 15:27:16 UTC (rev 1903)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/jbosscache-c=
onfiguration-templates.xml 2010-02-18 15:38:57 UTC (rev 1904)
@@ -1,7 +1,8 @@
-
+
+
=
JBoss Cache configuration
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-18 15:27:16 UTC (rev 1903)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/lock-manager=
-config.xml 2010-02-18 15:38:57 UTC (rev 1904)
@@ -1,440 +1,442 @@
-
-
-
-
-
- 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
-
- Full JCR configuration example you can see there
-
- 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
-
-
+
+
+
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-18 15:27:16 UTC (rev 1903)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/query-handle=
r-config.xml 2010-02-18 15:38:57 UTC (rev 1904)
@@ -1,187 +1,194 @@
-
-
-
-
- QueryHandler configuration
-
-
- How does it work?
-
- Lets talk about indexing content in cluster.
-
- For couple of reasons, we can't replicate index. That's means, s=
ome
- data added and indexed on one cluster node, will be replicated to anot=
her
- cluster node, but will not be indexed on that node.
-
- So, how do the indexing works in cluster
- environment?
-
- As, we can not index same data on all nodes of cluster, we must
- index it on one node. Node, that can index data and do changes on luce=
ne
- index, is called "coordinator". Coordinator-node is choosen automatica=
ly,
- so we do not need special configuration for coordinator.
-
- But, how can another nodes save their changes to lucene
- index?
-
- First of all, data is already saved and replicated to another
- cluster-nodes, so we need only deliver message like "we need to index =
this
- data" to coordinator. Thats why Jboss-cache is used.
-
- All nodes of cluster writes messages into JBoss-cache but only
- coordinator takes those messages and makes changes Lucene index.
-
- How do the search works in cluster
- environment?
-
- Search engine do not works with indexer, coordinator, etc. Search
- needs only lucene index. But only one cluster node can change lucene i=
ndex
- - asking you. Yes - lucene index is shared. So, all cluster nodes must=
be
- configured to use lucene index from shared directory.
-
- A little bit about indexing process (no matter, cluster or not)
- Indexer do not writes changes to FS lucene index immediately. At first,
- Indexer writes changes to Volatile index. If Volatile index size become
- 1Mb or more it is flushed to FS. Also there is timer, that flushes
- volatile index by timeout. Volatile index timeout configured by
- "max-volatile-time" paremeter.
-
- Common scheme of Shared Index
-
-
-
-
-
-
-
- Configuration
-
-
- Common requirements
-
- Now, lets see what we need to run Search engine in cluster
- environment.
-
- shared directory for storing Lucene index (i.e. NFS);
-
-
-
- changes filter configured as
- org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossC=
acheIndexChangesFilter;
-
-
- This filter ignore changes on non-coordinator nodes, a=
nd
- index changes on coordinator node.
-
-
-
-
- configure JBoss-cache, course;
-
-
-
-
-
- Query-handler configuration
-
- Configuration example:<workspace name=3D"ws=
">
- <query-handler class=3D"org.exoplatform.services.jcr.impl.core.query=
.lucene.SearchIndex">
- <properties>
- <property name=3D"index-dir" value=3D"shareddir/index/db1/ws" =
/>
- <property name=3D"changesfilter-class"
- value=3D"org.exoplatform.services.jcr.impl.core.query.jbosscac=
he.JBossCacheIndexChangesFilter" />
- <property name=3D"jbosscache-configuration" value=3D"jbosscach=
e-indexer.xml" />
- <property name=3D"jgroups-configuration" value=3D"udp-mux.xml"=
/>
- <property name=3D"jgroups-multiplexer-stack" value=3D"true" /&=
gt;
- <property name=3D"jbosscache-cluster-name" value=3D"JCR-cluste=
r-indexer-ws" />
- <property name=3D"max-volatile-time" value=3D"60" />
- </properties>
- </query-handler>
-</workspace>
- Config properties description
-
-
-
-
- Property name
-
- Description
-
-
-
-
-
- index-dir
-
- path to index
-
-
-
- jbosscache-configuration
-
- template of JBoss-cache configuration for all
- query-handlers in repository
-
-
-
- jgroups-configuration
-
- jgroups-configuration is template configuration for=
all
- components (search, cache, locks) [Add link to document
- describing template configurations]
-
-
-
- jgroups-multiplexer-stack
-
- [TODO about jgroups-multiplexer-stack - add link to
- JBoss doc]
-
-
-
- jbosscache-cluster-name
-
- cluster name (must be unique)
-
-
-
- max-volatile-time
-
- max time to live for Volatile Index
-
-
-
-
-
-
-
- JBoss-Cache template configuration
-
- JBoss-Cache template configuration for query handler.
-
- 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" />
- <!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass=3D"org.jboss.cache.transa=
ction.JBossStandaloneJTAManagerLookup" />
-
- <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>
-
-
-
+
+
+
+
+
+ QueryHandler configuration
+
+
+ How does it work?
+
+ Lets talk about indexing content in cluster.
+
+ For couple of reasons, we can't replicate index. That's means, s=
ome
+ data added and indexed on one cluster node, will be replicated to anot=
her
+ cluster node, but will not be indexed on that node.
+
+ So, how do the indexing works in cluster
+ environment?
+
+ As, we can not index same data on all nodes of cluster, we must
+ index it on one node. Node, that can index data and do changes on luce=
ne
+ index, is called "coordinator". Coordinator-node is choosen automatica=
ly,
+ so we do not need special configuration for coordinator.
+
+ But, how can another nodes save their changes to lucene
+ index?
+
+ First of all, data is already saved and replicated to another
+ cluster-nodes, so we need only deliver message like "we need to index =
this
+ data" to coordinator. Thats why Jboss-cache is used.
+
+ All nodes of cluster writes messages into JBoss-cache but only
+ coordinator takes those messages and makes changes Lucene index.
+
+ How do the search works in cluster
+ environment?
+
+ Search engine do not works with indexer, coordinator, etc. Search
+ needs only lucene index. But only one cluster node can change lucene i=
ndex
+ - asking you. Yes - lucene index is shared. So, all cluster nodes must=
be
+ configured to use lucene index from shared directory.
+
+ A little bit about indexing process (no matter, cluster or not)
+ Indexer do not writes changes to FS lucene index immediately. At first,
+ Indexer writes changes to Volatile index. If Volatile index size become
+ 1Mb or more it is flushed to FS. Also there is timer, that flushes
+ volatile index by timeout. Volatile index timeout configured by
+ "max-volatile-time" paremeter.
+
+ See more about Search
+ Configuration.
+
+ Common scheme of Shared Index
+
+
+
+
+
+
+
+ Configuration
+
+
+ Common requirements
+
+ Now, lets see what we need to run Search engine in cluster
+ environment.
+
+ shared directory for storing Lucene index (i.e. NFS);
+
+
+
+ changes filter configured as
+ org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossC=
acheIndexChangesFilter;
+
+
+ This filter ignore changes on non-coordinator nodes, a=
nd
+ index changes on coordinator node.
+
+
+
+
+ configure JBoss-cache, course;
+
+
+
+
+
+ Query-handler configuration
+
+ Configuration example:<workspace name=3D"ws=
">
+ <query-handler class=3D"org.exoplatform.services.jcr.impl.core.query=
.lucene.SearchIndex">
+ <properties>
+ <property name=3D"index-dir" value=3D"shareddir/index/db1/ws" =
/>
+ <property name=3D"changesfilter-class"
+ value=3D"org.exoplatform.services.jcr.impl.core.query.jbosscac=
he.JBossCacheIndexChangesFilter" />
+ <property name=3D"jbosscache-configuration" value=3D"jbosscach=
e-indexer.xml" />
+ <property name=3D"jgroups-configuration" value=3D"udp-mux.xml"=
/>
+ <property name=3D"jgroups-multiplexer-stack" value=3D"true" /&=
gt;
+ <property name=3D"jbosscache-cluster-name" value=3D"JCR-cluste=
r-indexer-ws" />
+ <property name=3D"max-volatile-time" value=3D"60" />
+ </properties>
+ </query-handler>
+</workspace>
+ Config properties description
+
+
+
+
+ Property name
+
+ Description
+
+
+
+
+
+ index-dir
+
+ path to index
+
+
+
+ jbosscache-configuration
+
+ template of JBoss-cache configuration for all
+ query-handlers in repository
+
+
+
+ jgroups-configuration
+
+ jgroups-configuration is template configuration for=
all
+ components (search, cache, locks) [Add link to document
+ describing template configurations]
+
+
+
+ jgroups-multiplexer-stack
+
+ [TODO about jgroups-multiplexer-stack - add link to
+ JBoss doc]
+
+
+
+ jbosscache-cluster-name
+
+ cluster name (must be unique)
+
+
+
+ max-volatile-time
+
+ max time to live for Volatile Index
+
+
+
+