exo-jcr SVN: r3906 - kernel/trunk/exo.kernel.commons/src/main/resources/org/exoplatform/commons/utils.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-31 12:03:05 -0500 (Mon, 31 Jan 2011)
New Revision: 3906
Modified:
kernel/trunk/exo.kernel.commons/src/main/resources/org/exoplatform/commons/utils/mimetypes.properties
Log:
EXOJCR-1142: Add application/x-jaxrs+groovy mime type to mimetypes.properties for *.grs extension
Modified: kernel/trunk/exo.kernel.commons/src/main/resources/org/exoplatform/commons/utils/mimetypes.properties
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/resources/org/exoplatform/commons/utils/mimetypes.properties 2011-01-31 15:51:13 UTC (rev 3905)
+++ kernel/trunk/exo.kernel.commons/src/main/resources/org/exoplatform/commons/utils/mimetypes.properties 2011-01-31 17:03:05 UTC (rev 3906)
@@ -30,6 +30,7 @@
exe=application/octet-stream
ez=application/andrew-inset
gif=image/gif
+grs=application/x-jaxrs+groovy
gtar=application/x-gtar
gz=application/x-gzip
hdf=application/x-hdf
13 years, 2 months
exo-jcr SVN: r3905 - in jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules: jcr/concepts and 3 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-31 10:51:13 -0500 (Mon, 31 Jan 2011)
New Revision: 3905
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml
Log:
EXOJCR-1177: Improve JCR Doc
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,52 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.ClusterConfig">
- <?dbhtml filename="ch-cluster-config.html"?>
-
- <title>Configuring JBoss AS with eXo JCR in cluster</title>
-
+<?dbhtml filename="ch-cluster-config.html"?> <title>Configuring JBoss AS with eXo JCR in cluster</title>
<section>
<title>Launching Cluster</title>
-
<section>
<title>Deploying eXo JCR to JBoss As</title>
-
<para>To deploy eXo JCR to JBoss, do the following steps:</para>
-
<orderedlist>
<listitem>
- <para>Dowload the latest version of eXo JCR ear distribution.</para>
+ <para>Download the latest version of eXo JCR .ear file distribution.</para>
</listitem>
-
<listitem>
<para>Copy <jcr.ear> into
<%jboss_home%/server/default/deploy></para>
</listitem>
-
<listitem>
<para>Put exo-configuration.xml to the root
<%jboss_home%/exo-configuration.xml></para>
</listitem>
-
<listitem>
<para>Configure JAAS by inserting XML fragment shown below into
<%jboss_home%/server/default/conf/login-config.xml></para>
-
- <programlisting><application-policy name="exo-domain">
+ <programlisting><application-policy name="exo-domain">
<authentication>
- <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
</authentication>
</application-policy></programlisting>
</listitem>
-
<listitem>
- <para>Ensure that you use JBossTS <link
- linkend="Kernel.TransactionService">Transaction Service</link> and
- JBossCache <link linkend="JCR.JBossTransactionsService">Transaction
- Manager</link>. Your exo-configuration.xml must contain such
+ <para>Ensure that you use JBossTS <link linkend="Kernel.TransactionService">Transaction Service</link> and
+ JBossCache <link linkend="JCR.JBossTransactionsService">Transaction Manager</link>. Your exo-configuration.xml must contain such
parts:</para>
-
<programlisting><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.GenericTransactionManagerLookup</type>^
@@ -63,79 +48,71 @@
</init-params>
</component></programlisting>
</listitem>
-
<listitem>
<para>Start server:</para>
-
<itemizedlist>
<listitem>
<para>bin/run.sh for Unix</para>
</listitem>
-
<listitem>
<para>bin/run.bat for Windows</para>
</listitem>
</itemizedlist>
</listitem>
-
<listitem>
<para>Try accessing <uri>http://localhostu:8080/browser</uri> with
- root/exo as login/password if you have done everything right, you'll
+ root/exo as login/password if you have done everything right, you'll
get access to repository browser.</para>
</listitem>
</orderedlist>
</section>
-
<section id="JCR.ClusterConfig.JCRExternalConfig">
<title>Configuring JCR to use external configuration</title>
-
<itemizedlist>
<listitem>
- <para>To manually configure repository create a new configuration
- file (f.e. exo-jcr-configuration.xml). For details, see <link
- linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
+ <para>To manually configure repository, create a new configuration
+ file (e.g., exo-jcr-configuration.xml). For details, see <link linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
configuration must look like:</para>
-
- <programlisting><repository-service default-repository="repository1">
+ <programlisting><repository-service default-repository="repository1">
<repositories>
- <repository name="repository1" system-workspace="ws1" default-workspace="ws1">
+ <repository name="repository1" system-workspace="ws1" default-workspace="ws1">
<security-domain>exo-domain</security-domain>
<access-control>optional</access-control>
<authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
<workspaces>
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="oracle" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="../temp/swap/production" />
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="oracle" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="../temp/swap/production" />
</properties>
<value-storages>
- see "<link linkend="conf_value_storage">Value storage configuration</link>" part.
+ see "<link linkend="conf_value_storage">Value storage configuration</link>" part.
</value-storages>
</container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
<properties>
- <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
- see "<link linkend="conf_cache">Cache configuration</link>" part.
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ see "<link linkend="conf_cache">Cache configuration</link>" part.
</cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- see "<link linkend="conf_indexer">Indexer configuration</link>" part.
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ see "<link linkend="conf_indexer">Indexer configuration</link>" part.
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- see "<link linkend="conf_lock_manager">Lock Manager configuration</link>" part.
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ see "<link linkend="conf_lock_manager">Lock Manager configuration</link>" part.
</lock-manager>
</workspace>
- <workspace name="ws2">
+ <workspace name="ws2">
...
</workspace>
- <workspace name="wsN">
+ <workspace name="wsN">
...
</workspace>
</workspaces>
@@ -143,9 +120,8 @@
</repositories>
</repository-service> </programlisting>
</listitem>
-
<listitem>
- <para>and update RepositoryServiceConfiguration configuration in
+ <para>Then, update RepositoryServiceConfiguration configuration in
exo-configuration.xml to use this file:<programlisting><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
@@ -161,105 +137,89 @@
</itemizedlist>
</section>
</section>
-
<section>
<title>Requirements</title>
-
<section>
- <title>Enviorenment requirements</title>
-
+ <title>Environment requirements</title>
<itemizedlist>
<listitem>
<para>Every node of cluster MUST have the same mounted Network File
- System with read and write permissions on it.</para>
-
- <para>"/mnt/tornado" - path to the mounted Network File System (all
- cluster nodes must use the same NFS)</para>
+ System with the read and write permissions on it.</para>
+ <para>"/mnt/tornado" - path to the mounted Network File System (all
+ cluster nodes must use the same NFS).</para>
</listitem>
-
<listitem>
- <para>Every node of cluster MUST use the same database</para>
+ <para>Every node of cluster MUST use the same database.</para>
</listitem>
-
<listitem>
- <para>Same Clusters on different nodes MUST have the same cluster
- names (f.e if Indexer cluster in workspace production on the first
- node has name "production_indexer_cluster", then indexer clusters in
+ <para>The same Clusters on different nodes MUST have the same
+ names (e.g., if Indexer cluster in workspace production on the first
+ node has the name "production_indexer_cluster", then indexer clusters in
workspace production on all other nodes MUST have the same name
- "production_indexer_cluster" )</para>
+ "production_indexer_cluster" ).</para>
</listitem>
</itemizedlist>
</section>
-
<section>
- <title>Enviorenment requirements</title>
-
+ <title>Configuration requirements</title>
<para>Configuration of every workspace in repository must contains of
such parts:</para>
-
<itemizedlist>
<listitem id="conf_value_storage">
<para>Value Storage configuration:</para>
-
<programlisting><value-storages>
- <value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="/mnt/tornado/temp/values/production" /> <!--path within NFS where ValueStorage will hold it's data-->
+ <property name="path" value="/mnt/tornado/temp/values/production" /> <!--path within NFS where ValueStorage will hold it's data-->
</properties>
<filters>
- <filter property-type="Binary" />
+ <filter property-type="Binary" />
</filters>
</value-storage>
</value-storages></programlisting>
</listitem>
-
<listitem id="conf_cache">
<para>Cache configuration:</para>
-
- <programlisting><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ <programlisting><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-data.xml" /> <!-- path to JBoss Cache configuration for data storage -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name" value="JCR_Cluster_cache_production" /> <!-- JBoss Cache data storage cluster name -->
- <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-data.xml" /> <!-- path to JBoss Cache configuration for data storage -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_cache_production" /> <!-- JBoss Cache data storage cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true" />
</properties>
</cache> </programlisting>
</listitem>
-
<listitem id="conf_indexer">
<para>Indexer configuration:</para>
-
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
- <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" /> <!-- path within NFS where ValueStorage will hold it's data -->
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache configuration for indexer -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name" value="JCR_Cluster_indexer_production" /> <!-- JBoss Cache indexer cluster name -->
- <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
+ <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" /> <!-- path within NFS where ValueStorage will hold it's data -->
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache configuration for indexer -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_indexer_production" /> <!-- JBoss Cache indexer cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true" />
</properties>
</query-handler> </programlisting>
</listitem>
-
<listitem id="conf_lock_manager">
<para>Lock Manager configuration:</para>
-
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!-- path to JBoss Cache configuration for lock manager -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jgroups-multiplexer-stack" value="true" />
- <property name="jbosscache-cluster-name" value="JCR_Cluster_lock_production" /> <!-- JBoss Cache locks cluster name -->
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!-- path to JBoss Cache configuration for lock manager -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_lock_production" /> <!-- JBoss Cache locks cluster name -->
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_production"/> <!-- the name of the DB table where lock's data will be stored -->
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true"/>
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false"/>
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_production_pk"/>
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn"/>
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node"/>
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent"/>
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr"/>
+ <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_production"/> <!-- the name of the DB table where lock's data will be stored -->
+ <property name="jbosscache-cl-cache.jdbc.table.create" value="true"/>
+ <property name="jbosscache-cl-cache.jdbc.table.drop" value="false"/>
+ <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_production_pk"/>
+ <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn"/>
+ <property name="jbosscache-cl-cache.jdbc.node.column" value="node"/>
+ <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent"/>
+ <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr"/>
</properties>
</lock-manager></programlisting>
</listitem>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,140 +1,105 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.eXoImplementation">
- <?dbhtml filename="ch-jcr-exo-implementation.html"?>
-
- <title>eXo JCR Implementation</title>
-
+<?dbhtml filename="ch-jcr-exo-implementation.html"?> <title>eXo JCR Implementation</title>
<section>
<title>Related Documents</title>
-
<para>Access Control Configuration, Export Import Implementation, External
Value Storages, JDBC Data Container config, Locking, Multilanguage
support, Node types and Namespaces, Repository and Workspace management,
Repository container life cycle, Workspace, Persistence Storage Workspace,
SimpleDB storage</para>
</section>
-
<section>
<title>How it works</title>
-
<para>eXo Repository Service is a standard eXo service and is a registered
- IoC component, i.e. can be deployed in some eXo Containers (see <link
- linkend="JCR.eXoJCRconfiguration.RepositoryConfiguration">Service
- configuration</link> for details). The relationships between components
+ IoC component, i.e. can be deployed in some eXo Containers (see <link linkend="JCR.eXoJCRconfiguration.RepositoryConfiguration">Service configuration</link> for details). The relationships between components
are shown in the picture below:</para>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/concepts/exojcr.gif" />
+ <imagedata fileref="images/concepts/exojcr.gif"/>
</imageobject>
</mediaobject>
-
<para><keycap>eXo Container: </keycap>some subclasses of
org.exoplatform.container.ExoContainer (usually
org.exoplatform.container.StandaloneContainer or
org.exoplatform.container.PortalContainer) that holds a reference to
Repository Service.</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">Repository Service:</emphasis> contains
information about repositories. eXo JCR is able to manage many
Repositories.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Repository:</emphasis> Implementation of
javax.jcr.Repository. It holds references to one or more
Workspace(s).</para>
</listitem>
-
<listitem>
<para><keycap>Workspace:</keycap> Container of a single rooted tree of
Items. (Note that here it is not exactly the same as
javax.jcr.Workspace as it is not a per Session object).</para>
</listitem>
</itemizedlist>
-
<para>Usual JCR application use case includes two initial steps:</para>
-
<itemizedlist>
<listitem>
- <para>Obtaining Repository object by getting <emphasis
- role="bold">Repository Service</emphasis> from the current eXo
- Container (eXo "native" way) or via JNDI lookup if eXo repository is
- bound to the naming context using (see <link
- linkend="JCR.eXoJCRconfiguration">Service configuration</link> for
+ <para>Obtaining Repository object by getting <emphasis role="bold">Repository Service</emphasis> from the current eXo
+ Container (eXo "native" way) or via JNDI lookup if eXo repository is
+ bound to the naming context using (see <link linkend="JCR.eXoJCRconfiguration">Service configuration</link> for
details).</para>
</listitem>
-
<listitem>
<para>Creating javax.jcr.Session object that calls
Repository.login(..).</para>
</listitem>
-
- <listitem>
- <para>Creating javax.jcr.Session object that calls
- Repository.login(..).</para>
- </listitem>
</itemizedlist>
</section>
-
<section>
<title>Workspace Data Model</title>
-
<para>The following diagram explains which components of eXo JCR
implementation are used in a data flow to perform operations specified in
JCR API</para>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/concepts/wsdatamodel.gif" />
+ <imagedata fileref="images/concepts/wsdatamodel.gif"/>
</imageobject>
</mediaobject>
-
- <para>The Workspace Data Model can be splitted into 4 levels by data
+ <para>The Workspace Data Model can be split into 4 levels by data
isolation and value from the JCR model point of view.</para>
-
<itemizedlist>
<listitem>
<para>eXo JCR core implements <emphasis role="bold">JCR API</emphasis>
- intefaces such as Item, Node, Property. It contains JCR "logical" view
+ interfaces, such as Item, Node, Property. It contains JCR "logical" view
on stored data.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Session Level</emphasis>: isolates
transient data viewable inside one JCR Session and interacts with API
level using eXo JCR internal API.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Session Data Manager</emphasis>: maintains
transient session data. With data access/ modification/ validation
logic, it contains Modified Items Storage to hold the data changed
between subsequent save() calling and Session Items Cache.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Transaction Data Manager</emphasis>:
maintains session data between save() and transaction commit/ rollback
if the current session is part of a transaction.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Workspace Level</emphasis>: operates for
particular workspace shared data. It contains per-Workspace
objects</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Workspace Storage Data Manager:</emphasis>
maintains workspace data, including final validation, events firing,
caching.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Workspace Data Container</emphasis>:
implements physical data storage. It allows different types of backend
@@ -142,27 +107,22 @@
the main Data Container, other storages for persisted Property Values
can be configured and used.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Indexer:</emphasis> maintains workspace
data indexing for further queries.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Storage Level</emphasis>: Persistent
storages for:</para>
-
<itemizedlist>
<listitem>
<para>JCR Data</para>
</listitem>
-
<listitem>
<para>Indexes (Apache Lucene)</para>
</listitem>
-
<listitem>
- <para>Values (for BLOBs for ex) if different from main Data
+ <para>Values (e.g., for BLOBs) if different from the main Data
Container</para>
</listitem>
</itemizedlist>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,41 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.Namespacealtering">
- <?dbhtml filename="ch-jcr-namespace-altering.html"?>
-
- <title>Namespace altering</title>
-
- <para>eXo JCR implementation since 1.11 version have support of altering
- namespaces.</para>
-
+<?dbhtml filename="ch-jcr-namespace-altering.html"?> <title>Namespace altering</title>
+ <para>Since version 1.11, eXo JCR implementation supports namespaces altering.</para>
<section>
<title>Adding new namespace</title>
-
<programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
-namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");</programlisting>
+namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");</programlisting>
</section>
-
<section>
<title>Changing existing namespace</title>
-
<programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
-namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
-namespaceRegistry.registerNamespace("newMapping2", "http://dumb.uri/jcr");
-try {
- assertNull(namespaceRegistry.getURI("newMapping"));
- fail("exception should have been thrown");
-} catch (NamespaceException e) {
-}
-assertNotNull(namespaceRegistry.getURI("newMapping2"));
-assertEquals("http://dumb.uri/jcr", namespaceRegistry.getURI("newMapping2"));</programlisting>
+namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
+namespaceRegistry.registerNamespace("newMapping2", "http://dumb.uri/jcr");</programlisting>
</section>
-
<section>
<title>Removing existing namespace</title>
-
<programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
-namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
-namespaceRegistry.unregisterNamespace("newMapping");</programlisting>
+namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
+namespaceRegistry.unregisterNamespace("newMapping");</programlisting>
</section>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,33 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.NodeTypeRegistration">
- <?dbhtml filename="ch-nodetype-registration.html"?>
-
- <title>NodeType Registration</title>
-
+<?dbhtml filename="ch-nodetype-registration.html"?> <title>NodeType Registration</title>
<para>eXo JCR implementation supports two ways of Nodetypes
registration:</para>
-
<itemizedlist>
<listitem>
- <para>From a NodeTypeValue POJO and</para>
+ <para>From a NodeTypeValue POJO</para>
</listitem>
-
<listitem>
- <para>From an XML document (stream).</para>
+ <para>From an XML document (stream)</para>
</listitem>
</itemizedlist>
-
<section>
<title>Interfaces and methods</title>
-
<section>
<title>ExtendedNodeTypeManager</title>
-
<para>The ExtendedNodeTypeManager (from JCR 1.11) interface provides the
- following methods related to registering node types</para>
-
+ following methods related to registering node types:</para>
<programlisting>public static final int IGNORE_IF_EXISTS = 0;
public static final int FAIL_IF_EXISTS = 2;
@@ -75,15 +65,12 @@
NoSuchNodeTypeException,
RepositoryException;</programlisting>
</section>
-
<section>
<title>NodeTypeValue</title>
-
<para>The NodeTypeValue interface represents a simple container
structure used to define node types which are then registered through
- the ExtendedNodeTypeManager.registerNodeType method. Implementation of
- this interface doesn't contain any validation logic.</para>
-
+ the ExtendedNodeTypeManager.registerNodeType method. The implementation of
+ this interface does not contain any validation logic.</para>
<programlisting>/**
* @return Returns the declaredSupertypeNames.
*/
@@ -161,15 +148,12 @@
*/
public void setDeclaredPropertyDefinitionValues(List<PropertyDefinitionValue> declaredPropertyDefinitionValues);</programlisting>
</section>
-
<section>
<title>NodeDefinitionValue</title>
-
<para>The NodeDefinitionValue interface extends ItemDefinitionValue with
the addition of writing methods, enabling the characteristics of a child
- node definition to be set, after which the NodeDefinitionValue is added
+ node definition to be set, after that the NodeDefinitionValue is added
to a NodeTypeValue.</para>
-
<programlisting>/**
* @return Returns the declaredSupertypeNames.
*/
@@ -249,15 +233,12 @@
</programlisting>
</section>
-
<section>
<title>PropertyDefinitionValue</title>
-
<para>The PropertyDefinitionValue interface extends ItemDefinitionValue
with the addition of writing methods, enabling the characteristics of a
- child property definition to be set, after which the
+ child property definition to be set, after that the
PropertyDefinitionValue is added to a NodeTypeValue.</para>
-
<programlisting>/**
* @return Returns the defaultValues.
*/
@@ -298,10 +279,8 @@
*/
public void setValueConstraints(List<String> valueConstraints);</programlisting>
</section>
-
<section>
<title>ItemDefinitionValue</title>
-
<programlisting> /**
* @return Returns the autoCreate.
*/
@@ -353,36 +332,30 @@
public void setReadOnly(boolean readOnly);</programlisting>
</section>
</section>
-
<section>
<title>Node type registration</title>
-
<para>eXo JCR implementation supports various methods of the node-type
registration.</para>
-
<section>
<title>Run time registration from xml file.</title>
-
<programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
-InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
+InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
nodeTypeManager.registerNodeTypes(is,ExtendedNodeTypeManager.IGNORE_IF_EXISTS );</programlisting>
</section>
-
<section>
<title>Run time registration using NodeTypeValue.</title>
-
<programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
NodeTypeValue testNValue = new NodeTypeValue();
List<String> superType = new ArrayList<String>();
-superType.add("nt:base");
-testNValue.setName("exo:myNodeType");
-testNValue.setPrimaryItemName("");
+superType.add("nt:base");
+testNValue.setName("exo:myNodeType");
+testNValue.setPrimaryItemName("");
testNValue.setDeclaredSupertypeNames(superType);
List<PropertyDefinitionValue> props = new ArrayList<PropertyDefinitionValue>();
-props.add(new PropertyDefinitionValue("*",
+props.add(new PropertyDefinitionValue("*",
false,
false,
1,
@@ -396,42 +369,33 @@
nodeTypeManager.registerNodeType(testNValue, ExtendedNodeTypeManager.FAIL_IF_EXISTS);</programlisting>
</section>
</section>
-
<section>
<title>Changing existing node type</title>
-
<para>If you want to replace existing node type definition, you should
pass ExtendedNodeTypeManager.REPLACE_IF_EXISTS as a second parameter for
the method ExtendedNodeTypeManager.registerNodeType.</para>
-
<programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
-InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
+InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
.....
nodeTypeManager.registerNodeTypes(is,ExtendedNodeTypeManager.REPLACE_IF_EXISTS );</programlisting>
</section>
-
<section>
<title>Removing node type</title>
-
<note>
- <para>: Node type is only possibly removed when repository doesn't
- contains this node type.</para>
+ <para>Node type is only possibly removed when the repository does not
+ contain this node type.</para>
</note>
-
- <programlisting>nodeTypeManager.unregisterNodeType("myNodeType");</programlisting>
+ <programlisting>nodeTypeManager.unregisterNodeType("myNodeType");</programlisting>
</section>
-
<section>
<title>Practical How to</title>
-
<section>
<title>Adding new PropertyDefinition</title>
-
<programlisting>
NodeTypeValue myNodeTypeValue = nodeTypeManager.getNodeTypeValue(myNodeTypeName);
List<PropertyDefinitionValue> props = new ArrayList<PropertyDefinitionValue>();
-props.add(new PropertyDefinitionValue("tt",
+props.add(new PropertyDefinitionValue("tt",
true,
true,
1,
@@ -444,87 +408,69 @@
nodeTypeManager.registerNodeType(myNodeTypeValue, ExtendedNodeTypeManager.REPLACE_IF_EXISTS);</programlisting>
</section>
-
<section>
<title>Adding new child NodeDefinition</title>
-
<programlisting>NodeTypeValue myNodeTypeValue = nodeTypeManager.getNodeTypeValue(myNodeTypeName);
List<NodeDefinitionValue> nodes = new ArrayList<NodeDefinitionValue>();
-nodes.add(new NodeDefinitionValue("child",
+nodes.add(new NodeDefinitionValue("child",
false,
false,
1,
false,
- "nt:base",
+ "nt:base",
new ArrayList<String>(),
false));
testNValue.setDeclaredChildNodeDefinitionValues(nodes);
nodeTypeManager.registerNodeType(myNodeTypeValue, ExtendedNodeTypeManager.REPLACE_IF_EXISTS);</programlisting>
</section>
-
<section>
- <title>Changing or removing existing PropertyDefinition or child
- NodeDefinition</title>
-
- <para>Note to <emphasis role="bold">consistency of the existing
- data</emphasis> before changing or removing existing definition . JCR
+ <title>Changing or removing existing PropertyDefinition or child NodeDefinition</title>
+ <para>Note that the existing data must be consistent before changing or removing a existing definition . JCR
<emphasis role="bold">does not allow</emphasis> you to change the node
- type in the way in which the the existing data would be incompatible
- with new node type. But if these changes are needed, you can do it in
+ type in the way in which the existing data would be incompatible
+ with a new node type. But if these changes are needed, you can do it in
several phases, consistently changing the node type and the existing
data.</para>
-
<para>For example:</para>
-
- <para>Add new residual property definition with name "downloadCount" to
- the existing node type "myNodeType".</para>
-
- <para>There are two limitations that do not allow us to made the task
- with single call of registerNodeType method.</para>
-
+ <para>Add a new residual property definition with name "downloadCount" to
+ the existing node type "myNodeType".</para>
+ <para>There are two limitations that do not allow us to make the task
+ with a single call of registerNodeType method.</para>
<itemizedlist>
<listitem>
- <para>Existing nodes of the type "myNodeType", which does not
- contain properties "downloadCount" that conflicts with node type
+ <para>Existing nodes of the type "myNodeType", which does not
+ contain properties "downloadCount" that conflicts with node type
what we need.</para>
</listitem>
-
<listitem>
- <para>Registered node type "myNodeType" will not allow us to add
- properties "downloadCount" because it has no such specific
+ <para>Registered node type "myNodeType" will not allow us to add
+ properties "downloadCount" because it has no such specific
properties.</para>
</listitem>
</itemizedlist>
-
<para>To complete the task, we need to make 3 steps:</para>
-
<itemizedlist>
<listitem>
- <para>Changing the existing node type "myNodeType" by adding not
- mandatory property "downloadCount".</para>
+ <para>Change the existing node type "myNodeType" by adding the
+ mandatory property "downloadCount".</para>
</listitem>
-
<listitem>
- <para>Adding to all existing nodes of the node type "myNodeType"
- property "downloadCount".</para>
+ <para>Add the node type "myNodeType" with the property "downloadCount" to all the existing node types.</para>
</listitem>
-
<listitem>
- <para>Changing definition of the property "downloadCount" of the
- node type "myNodeType" to mandatory.</para>
+ <para>Change the definition of the property "downloadCount" of the
+ node type "myNodeType" to mandatory.</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>Changing the list of super types</title>
+ <programlisting>NodeTypeValue testNValue = nodeTypeManager.getNodeTypeValue("exo:myNodeType");
- <programlisting>NodeTypeValue testNValue = nodeTypeManager.getNodeTypeValue("exo:myNodeType");
-
List<String> superType = testNValue.getDeclaredSupertypeNames();
-superType.add("mix:versionable");
+superType.add("mix:versionable");
testNValue.setDeclaredSupertypeNames(superType);
nodeTypeManager.registerNodeType(testNValue, ExtendedNodeTypeManager.REPLACE_IF_EXISTS);</programlisting>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,183 +1,143 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.LockManagerConfiguration">
- <?dbhtml filename="ch-lock-manager-config.html"?>
-
- <title>LockManager configuration</title>
-
+<?dbhtml filename="ch-lock-manager-config.html"?> <title>LockManager configuration</title>
<section>
<title>Introduction</title>
-
<para>What LockManager does?</para>
-
- <para>In general, LockManager stores lock objects, so it can give Lock
+ <para>In general, LockManager stores Lock objects, so it can give a Lock
object or can release it, etc.</para>
-
<para>Also, LockManager is responsible for removing Locks that live too
- long. This parameter may be configured with "time-out" property.</para>
-
- <para>JCR provide two base implementation of LockManager:</para>
-
+ long. This parameter may be configured with "time-out" property.</para>
+ <para>JCR provides two basic implementations of LockManager:</para>
<itemizedlist>
<listitem>
<para><classname>org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl</classname>;</para>
</listitem>
-
<listitem>
<para><classname>org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl</classname>;</para>
</listitem>
</itemizedlist>
-
- <para>In this article, we will talk mostly about
+ <para>In this article, we will mostly mention about
CacheableLockManagerImpl.</para>
-
<para>You can enable LockManager by adding lock-manager-configuration to
workspace-configuration.</para>
-
<para>For example:</para>
-
- <programlisting><workspace name="ws">
+ <programlisting><workspace name="ws">
...
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
+ <property name="time-out" value="15m" />
...
</properties>
</lock-manager>
...
</workspace></programlisting>
</section>
-
<section>
<title>LockManagerImpl</title>
-
- <para>LockManagerImpl is simple implementation of LockManager, and also
+ <para>LockManagerImpl is a 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
does not support replication in any way.</para>
-
- <para>See more about LockManager Configuration at <link
- linkend="JCR.eXoJCRconfiguration">here</link>.</para>
+ <para>See more about LockManager Configuration at <link linkend="JCR.eXoJCRconfiguration">here</link>.</para>
</section>
-
<section>
<title>CacheableLockManagerImpl</title>
-
- <para>CacheableLockManagerImpl stores Lock object in JBoss-cache, so Locks
- are replicable and affects on cluster, not only a single node. Also
- JBoss-cache has JDBCCacheLoader, so locks will be stored to
+ <para>CacheableLockManagerImpl stores Lock objects in JBoss-cache, so Locks
+ are replicable and affect on cluster, not only a single node. Also,
+ JBoss-cache has JDBCCacheLoader, so Locks will be stored to the
database.</para>
-
- <para>Both implementation supports Expired Locks removing. There is
- LockRemover - separate thread, that periodically ask LockManager for Locks
- that live much and must be removed. So, timeout for LockRemover may be set
- as follows, default value is 30m.</para>
-
+ <para>Both of the implementations support to remove Expired Locks. LockRemover separates threads, that periodically ask LockManager to remove Locks
+ that live so long. So, the timeout for LockRemover may be set
+ as follows, the default value is 30m.</para>
<programlisting><properties>
- <property name="time-out" value="10m" />
+ <property name="time-out" value="10m" />
...
</properties></programlisting>
-
<section>
<title>Configuration</title>
-
- <para>Replication requirements are the same for Cache</para>
-
- <para> You can see a full JCR configuration example at <link
- linkend="JCR.ClusterConfig.JCRExternalConfig">here</link>.</para>
-
+ <para>Replication requirements are the same for Cache.</para>
+ <para> You can see a full JCR configuration example at <link linkend="JCR.ClusterConfig.JCRExternalConfig">here</link>.</para>
<para>Common tips:</para>
-
<itemizedlist>
<listitem>
- <para><parameter>clusterName</parameter> ("jbosscache-cluster-name")
+ <para><parameter>clusterName</parameter> ("jbosscache-cluster-name")
must be unique;</para>
</listitem>
-
<listitem>
<para><parameter>cache.jdbc.table.name</parameter> must be unique
per datasource;</para>
</listitem>
-
<listitem>
- <para><parameter>cache.jdbc.fqn.type</parameter> must and
+ <para><parameter>cache.jdbc.fqn.type</parameter> and
cache.jdbc.node.type must be configured according to used
database;</para>
</listitem>
</itemizedlist>
-
- <para>There is a few ways to configure CacheableLockManagerImpl, and all
+ <para>There are a few ways to configure CacheableLockManagerImpl, and all
of them configure JBoss-cache and JDBCCacheLoader.</para>
-
- <para>See <ulink
- url="http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader">http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader</ulink></para>
+ <para>See <ulink url="http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader">http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader</ulink></para>
</section>
-
<section>
- <title>Simple JbossCache Configuraion</title>
-
- <para>First one is - put JbossCache configuraion file path to
- CacheableLockManagerImpl</para>
-
+ <title>Simple JbossCache Configuration</title>
+ <para>The first one is putting JbossCache configuraion file path to
+ CacheableLockManagerImpl.</para>
<para><note>
- <para>This configuration is not so good as you can think. Because
- repository may contain many workspaces, and each workspace must
- contain LockManager configuration, and LockManager config may
- contain JbossCache config file. So total configuration is growing
- up. But it is usefull if we want a single LockManager with special
+ <para>This configuration is not so good as you think. Because
+ the repository may contain many workspaces, and each workspace must
+ contain LockManager configuration, and LockManager configuration may
+ contain the JbossCache config file. So, the total configuration will grow
+ up. But it is useful if we want to have a single LockManager with a special
configuration.</para>
</note></para>
-
- <para>Config is:</para>
-
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <para>Configuration is as follows:</para>
+ <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="conf/standalone/cluster/test-jbosscache-lock-config.xml" />
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration" value="conf/standalone/cluster/test-jbosscache-lock-config.xml" />
</properties>
</lock-manager></programlisting>
+ <para><filename>test-jbosscache-lock-config.xml</filename><programlisting><?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
- <para><filename>test-jbosscache-lock-config.xml</filename><programlisting><?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
-
- <clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_Name">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true" />
+ <clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_Name">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true" />
<jgroupsConfig>
- <TCP bind_addr="127.0.0.1" start_port="9800" loopback="true" recv_buf_size="20000000" send_buf_size="640000" discard_incompatible_packets="true"
- max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
- skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
- thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
- oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
- <MPING timeout="2000" num_initial_members="2" mcast_port="34540" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+ <TCP bind_addr="127.0.0.1" start_port="9800" loopback="true" recv_buf_size="20000000" send_buf_size="640000" discard_incompatible_packets="true"
+ max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="2" mcast_port="34540" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
- <MERGE2 max_interval="30000" min_interval="10000" />
+ <MERGE2 max_interval="30000" min_interval="10000" />
<FD_SOCK />
- <FD max_tries="5" shun="true" timeout="10000" />
- <VERIFY_SUSPECT timeout="1500" />
- <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
- <UNICAST timeout="300,600,1200,2400,3600" />
- <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000" />
- <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
- <FRAG2 frag_size="60000" />
+ <FD max_tries="5" shun="true" timeout="10000" />
+ <VERIFY_SUSPECT timeout="1500" />
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
+ <UNICAST timeout="300,600,1200,2400,3600" />
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000" />
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
+ <FRAG2 frag_size="60000" />
<pbcast.STREAMING_STATE_TRANSFER />
- <pbcast.FLUSH timeout="0" />
+ <pbcast.FLUSH timeout="0" />
</jgroupsConfig
<sync />
</clustering>
- <loaders passivation="false" shared="true">
+ <loaders passivation="false" shared="true">
<preload>
- <node fqn="/" />
+ <node fqn="/" />
</preload>
- <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
<properties>
cache.jdbc.table.name=jcrlocks_ws
cache.jdbc.table.create=true
@@ -195,63 +155,53 @@
</loaders>
</jbosscache></programlisting></para>
-
<para>Configuration requirements:</para>
-
<itemizedlist>
<listitem>
- <para><clustering mode="replication"
- clusterName="JBoss-Cache-Lock-Cluster_Name"> - cluster name must
+ <para><clustering mode="replication"
+ clusterName="JBoss-Cache-Lock-Cluster_Name"> - the cluster name must
be unique;</para>
</listitem>
-
<listitem>
<para><parameter>cache.jdbc.table.name</parameter> must be unique
per datasource;</para>
</listitem>
-
<listitem>
<para><parameter>cache.jdbc.node.type</parameter> and
<parameter>cache.jdbc.fqn.type</parameter> must be configured
- according to using database. See <link endterm="datatypes.title"
- linkend="datatypes"></link> .</para>
+ according to using the database. See <link endterm="datatypes.title" linkend="datatypes"/> .</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>Template JBossCache Configuration</title>
-
- <para>Second one is using template JBoss-cache configuration for all
- LockManagers</para>
-
+ <para>The second one is using the template JBoss-cache configuration for all
+ LockManagers.</para>
<para><citetitle>Lock template configuration</citetitle></para>
-
<para><filename>test-jbosscache-lock.xml</filename></para>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000" />
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
- lockAcquisitionTimeout="20000" />
-
- <clustering mode="replication" clusterName="${jbosscache-cluster-name}">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <jgroupsConfig multiplexerStack="jcr.stack" />
+ <clustering mode="replication" clusterName="${jbosscache-cluster-name}">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <jgroupsConfig multiplexerStack="jcr.stack" />
<sync />
</clustering>
- <loaders passivation="false" shared="true">
+ <loaders passivation="false" shared="true">
<!-- All the data of the JCR locks needs to be loaded at startup -->
<preload>
- <node fqn="/" />
+ <node fqn="/" />
</preload>
<!--
For another cache-loader class you should use another template with
cache-loader specific parameters
->
- <loader class="org.jboss.cache.loader.JDBCCacheLoader" async=q"false" fetchPersistentState="false"
- ignoreModifications="false" purgeOnStartup="false">
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader" async=q"false" fetchPersistentState="false"
+ ignoreModifications="false" purgeOnStartup="false">
<properties>
cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
cache.jdbc.table.create=${jbosscache-cl-cache.jdbc.table.create}
@@ -267,76 +217,70 @@
</loader>
</loaders>
</jbosscache></programlisting>
-
- <para>As you see, all configurable paramaters are filled by templates
- and will be replaced by LockManagers conf parameters:</para>
-
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <para>As you see, all configurable parameters are filled by templates
+ and will be replaced by LockManagers configuration parameters:</para>
+ <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="test-jbosscache-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="jgroups-multiplexer-stack" value="true" />
- <property name="jbosscache-cluster-name" value="JCR-cluster-locks-ws" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_ws" />
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_ws_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="AUTO"/>
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="AUTO"/>
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration" value="test-jbosscache-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-cluster-name" value="JCR-cluster-locks-ws" />
+ <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_ws" />
+ <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+ <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+ <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_ws_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type" value="AUTO"/>
+ <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type" value="AUTO"/>
+ <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
</lock-manager></programlisting>
-
<para>Configuration requirements:<itemizedlist>
<listitem>
<para><parameter>jbosscache-cl-cache.jdbc.fqn.column</parameter>
and <parameter>jbosscache-cl-cache.jdbc.node.type</parameter> is
- nothing else as cache.jdbc.fqn.type and cache.jdbc.node.type in
+ the same as cache.jdbc.fqn.type and cache.jdbc.node.type in
JBoss-Cache configuration. You can set those data types according
- to database type (See <link endterm="datatypes.title"
- linkend="datatypes"></link>) or set it as AUTO (or do not set at
- all) and data type will by detected automaticaly.</para>
+ to database type (See <link endterm="datatypes.title" linkend="datatypes"/>) or set it as AUTO (or do not set at
+ all) and data type will be detected automatically.</para>
</listitem>
-
<listitem>
- <para>As you see, jgroups-configuration moved to separate config
- file - udp-mux.xml; In our case udp-mux.xml is common JGroup
- config for all components (QueryHandler, cache, LockManager). But
- we can still create own config.</para>
+ <para>As you see, jgroups-configuration is moved to separate the configuration
+ file - udp-mux.xml. In this case, the udp-mux.xml file is a common JGroup
+ configuration for all components (QueryHandler, Cache, LockManager), but
+ we can still create our own configuration.</para>
</listitem>
</itemizedlist></para>
-
<para><filename>our-udp-mux.xml</filename><programlisting><protocol_stacks>
- <stack name="jcr.stack">
+ <stack name="jcr.stack">
<config>
- <UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
- discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
- use_incoming_packet_handler="true" ip_ttl="2" enable_bundling="true" enable_diagnostics="true"
- thread_naming_pattern="cl" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="2"
- thread_pool.max_threads="8" thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="1000" thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="Run" />
+ <UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
+ discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
+ use_incoming_packet_handler="true" ip_ttl="2" enable_bundling="true" enable_diagnostics="true"
+ thread_naming_pattern="cl" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="2"
+ thread_pool.max_threads="8" thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000" thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="Run" />
- <PING timeout="2000" num_initial_members="3" />
- <MERGE2 max_interval="30000" min_interval="10000" />
+ <PING timeout="2000" num_initial_members="3" />
+ <MERGE2 max_interval="30000" min_interval="10000" />
<FD_SOCK />
- <FD timeout="10000" max_tries="5" shun="true" />
- <VERIFY_SUSPECT timeout="1500" />
+ <FD timeout="10000" max_tries="5" shun="true" />
+ <VERIFY_SUSPECT timeout="1500" />
<BARRIER />
- <pbcast.NAKACK use_stats_for_retransmission="false" exponential_backoff="150" use_mcast_xmit="true"
- gc_lag="0" retransmit_timeout="50,300,600,1200" discard_delivered_msgs="true" />
- <UNICAST timeout="300,600,1200" />
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="1000000" />
- <VIEW_SYNC avg_send_interval="60000" />
- <pbcast.GMS print_local_addr="true" join_timeout="3000" shun="false" view_bundling="true" />
- <FC max_credits="500000" min_threshold="0.20" />
- <FRAG2 frag_size="60000" />
+ <pbcast.NAKACK use_stats_for_retransmission="false" exponential_backoff="150" use_mcast_xmit="true"
+ gc_lag="0" retransmit_timeout="50,300,600,1200" discard_delivered_msgs="true" />
+ <UNICAST timeout="300,600,1200" />
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="1000000" />
+ <VIEW_SYNC avg_send_interval="60000" />
+ <pbcast.GMS print_local_addr="true" join_timeout="3000" shun="false" view_bundling="true" />
+ <FC max_credits="500000" min_threshold="0.20" />
+ <FRAG2 frag_size="60000" />
<!--pbcast.STREAMING_STATE_TRANSFER /-->
<pbcast.STATE_TRANSFER />
<!-- pbcast.FLUSH /-->
@@ -344,94 +288,62 @@
</stack>
</protocol_stacks> </programlisting></para>
</section>
-
<section id="datatypes">
<title id="datatypes.title">Data Types in Different Databases</title>
-
<table>
- <title>Fqn type and node type in different databases</title>
-
+ <title>FQN type and node type in different databases</title>
<tgroup cols="3">
<thead>
<row>
<entry>DataBase name</entry>
-
<entry>Node data type</entry>
-
<entry>FQN data type</entry>
</row>
</thead>
-
<tbody>
<row>
<entry>default</entry>
-
<entry>BLOB</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>HSSQL</entry>
-
<entry>OBJECT</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>MySQL</entry>
-
<entry>LONGBLOB</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>ORACLE</entry>
-
<entry>BLOB</entry>
-
<entry>VARCHAR2(512)</entry>
</row>
-
<row>
<entry>PostgreSQL</entry>
-
<entry>bytea</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>MSSQL</entry>
-
<entry>VARBINARY(MAX)</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>DB2</entry>
-
<entry>BLOB</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>Sybase</entry>
-
<entry>IMAGE</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>Ingres</entry>
-
<entry>long byte</entry>
-
<entry>VARCHAR(512)</entry>
</row>
</tbody>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,122 +1,92 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.AccessControl">
- <?dbhtml filename="ch-acl.html"?>
-
- <title>Access Control</title>
-
- <para>eXo JCR is a complete implementation of the standard JSR 170: <ulink
- url="http://jcp.org/en/jsr/detail?id=170">Content Repository for Java TM
- Technology API</ulink>, including <emphasis role="bold">Level 1, Level 2 and
- Additional Features</emphasis> specified in the JCR Specification.</para>
-
+<?dbhtml filename="ch-acl.html"?> <title>Access Control</title>
+ <para>eXo JCR is a complete implementation of the standard JSR 170: <ulink url="http://jcp.org/en/jsr/detail?id=170">Content Repository for Java TM Technology API</ulink>, including <emphasis role="bold">Level 1, Level 2 and Additional Features</emphasis> specified in the JCR Specification.</para>
<section>
<title>Standard Action Permissions</title>
-
<para>The JCR specification (JSR 170) does not have many requirements
about Access Control. It only requires the implementation of the
Session.checkPermission(String absPath, String actions) method. This
method checks if a current session has permissions to perform some actions
on absPath:</para>
-
<itemizedlist>
<listitem>
<para>absPath : The string representation of a JCR absolute
- path</para>
+ path.</para>
</listitem>
-
<listitem>
<para>actions : eXo JCR interprets this string as a comma separated
- the list of individual action names such as the 4 types defined in JSR
+ the list of individual action names, such as the 4 types defined in JSR
170 :</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">add_node</emphasis> : Permission to
- add a node</para>
+ add a node.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">set_property</emphasis> : Permission
- to set a property</para>
+ to set a property.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">remove</emphasis> : Permission to
- remove an item (node or property)</para>
+ remove an item (node or property).</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">read</emphasis> : Permission to
- retrieve a node or read a property value</para>
+ retrieve a node or read a property value.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
-
<para>For example :</para>
-
<itemizedlist>
<listitem>
- <para>session.checkPermission("/Groups/organization",
- "add_node,set_property") will check if the session is allowed to add a
- child node to "organization" and to modify its properties. If one of
+ <para>session.checkPermission("/Groups/organization",
+ "add_node,set_property") will check if the session is allowed to add a
+ child node to "organization" and to modify its properties. If one of
the two permissions is denied, an AccessDeniedException is
thrown.</para>
</listitem>
-
<listitem>
- <para>session.checkPermission("/Groups/organization/exo:name",
- "read,set_property") will check if the session is allowed to read and
- change the "exo:name" property of the "organization" node.</para>
+ <para>session.checkPermission("/Groups/organization/exo:name",
+ "read,set_property") will check if the session is allowed to read and
+ change the "exo:name" property of the "organization" node.</para>
</listitem>
-
<listitem>
- <para>session.checkPermission("/Groups/organization/exo:name",
- "remove") will check if the session allowed to remove "exo:name"
+ <para>session.checkPermission("/Groups/organization/exo:name",
+ "remove") will check if the session allowed to remove "exo:name"
property or node.</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>eXo Access Control</title>
-
<para>The JSR170 specification does not define how permissions are managed
or checked. So eXo JCR has implemented its own proprietary extension to
manage and check permissions on nodes. In essence, this extension uses an
- <ulink url="http://en.wikipedia.org/wiki/Access_control_list">Access
- Control List (ACL)</ulink> policy model applied to eXo Organization model
+ <ulink url="http://en.wikipedia.org/wiki/Access_control_list">Access Control List (ACL)</ulink> policy model applied to eXo Organization model
(see eXo Platform Organization Service).</para>
-
<section>
<title>Principal and Identity</title>
-
- <para>At the heart of eXo Access Control, is the notion of the <emphasis
- role="bold">identity</emphasis> concept. Access to JCR is made through
+ <para>At the heart of eXo Access Control, is the notion of the <emphasis role="bold">identity</emphasis> concept. Access to JCR is made through
sessions acquired against a repository. Sessions can be authenticated
through the standard (but optional) repository login mechanism. Each
session is associated with a <emphasis role="bold">principal</emphasis>.
The principal is an authenticated user or group that may act on JCR
- data. The identity is a string identifying this <emphasis
- role="bold">group or user</emphasis>.'</para>
-
+ data. The identity is a string identifying this <emphasis role="bold">group or user</emphasis>.'</para>
<para>There are 3 reserved identities that have special meanings in eXo
JCR:</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">any</emphasis> : represents any
authenticated session.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">anonim</emphasis> : represents a
- principal for non authenticated sessions. (No error, it's really
- "\_\_anonim".)</para>
+ principal for non authenticated sessions. (No error, it's really
+ "\_\_anonim".)</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">system</emphasis> : represents a
principal for system sessions, typically used for administrative
@@ -126,18 +96,14 @@
</listitem>
</itemizedlist>
</section>
-
<section>
<title>ACL</title>
-
<para>An access control list (ACL) is a list of permissions attached to
an object. An ACL specifies which users, groups or system processes are
granted access to JCR nodes, as well as what operations are allowed to
be performed on given objects.</para>
-
<para>eXo JCR Access Control is based on two facets applied to nodes
:</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">Privilegeable</emphasis> : Means that
@@ -145,7 +111,6 @@
privileges to access to this node. The privileges are defined as
(positive) permissions that are granted to users or groups.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Ownable</emphasis> : The node has an
<emphasis role="bold">owner</emphasis>. The owner has always
@@ -153,119 +118,93 @@
the node, independent of the privilegeable facet.</para>
</listitem>
</itemizedlist>
-
<section>
<title>Privilegeable</title>
-
<para>A privilegeable node defines the permissions required for
actions on this node. For this purpose, it contains an ACL.</para>
-
- <para>At JCR level, this is implemented by an <emphasis
- role="bold">exo:privilegeable</emphasis> mixin.</para>
-
- <programlisting><nodeType name="exo:privilegeable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <para>At JCR level, this is implemented by an <emphasis role="bold">exo:privilegeable</emphasis> mixin.</para>
+ <programlisting><nodeType name="exo:privilegeable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
- <propertyDefinition name="exo:permissions" requiredType="Permission" autoCreated="true" mandatory="true"
- onParentVersion="COPY" protected="true" multiple="true">
+ <propertyDefinition name="exo:permissions" requiredType="Permission" autoCreated="true" mandatory="true"
+ onParentVersion="COPY" protected="true" multiple="true">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
</nodeType></programlisting>
-
<para>A privilegeable node can have multiple exo:permissions values.
- The type of these values is the eXo JCR specific type Permission. The
+ The type of these values is the eXo JCR specific Permission type. The
Permission type contains a list of ACL.</para>
-
<para>The possible values are corresponding to JCR standard
actions:</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">read</emphasis>: The node or its
properties can be read.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">remove</emphasis>: The node or its
properties can be removed.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">add_node</emphasis> : Child nodes can
be added to this node.</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">set_property</emphasis> : The node's
+ <para><emphasis role="bold">set_property</emphasis> : The node's
properties can be modified, added or removed.</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>Ownable</title>
-
- <para>An ownable node defines an owner identity. The <emphasis
- role="bold">owner</emphasis> has always <emphasis role="bold">full
- privileges</emphasis>. These privileges are independent of the
+ <para>An ownable node defines an owner identity. The <emphasis role="bold">owner</emphasis> has always <emphasis role="bold">full privileges</emphasis>. These privileges are independent of the
permissions set by exo:permissions. At JCR level, the ownership is
implemented by an <emphasis role="bold">exo:owneable</emphasis> mixin.
This mixin holds an owner property.</para>
-
- <programlisting><nodeType name="exo:owneable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <programlisting><nodeType name="exo:owneable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
- <propertyDefinition name="exo:owner" requiredType="String" autoCreated="true" mandatory="true" onParentVersion="COPY"
- protected="true" multiple="false">
+ <propertyDefinition name="exo:owner" requiredType="String" autoCreated="true" mandatory="true" onParentVersion="COPY"
+ protected="true" multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
</nodeType></programlisting>
-
<para>The exo:owner property value contains exactly one identity
string value. There might be a long list of different permissions for
different identities (user or groups). All permissions are always
positive permissions; denials are not possible. When checking a
- permission of an action, it's therefore perfectly sufficient that the
- principal of a session belongs to one the groups, to whom the
+ permission of an action, it's therefore perfectly sufficient that the
+ principal of a session belongs to the groups to which the
concerned action is granted.</para>
</section>
-
<section>
<title>ACL Inheritance</title>
-
- <para>In order to grant or deny access to a node, eXo JCR applies a
+ <para>To grant or deny access to a node, eXo JCR applies a
privilege resolving logic at node access time.</para>
-
<para>If a node is <emphasis role="bold">privilegeable</emphasis>, the
- node's ACL is used exclusively. If the ACL does not match the
- principal's identity, the principal has no access (except the owner of
+ node's ACL is used exclusively. If the ACL does not match the
+ principal's identity, the principal has no access (except the owner of
the node).</para>
-
<para>Non-privilegeable nodes inherit permissions from their parent
- node. If the parent node isn't privilegeable either, the resolving
+ node. If the parent node is not privilegeable either, the resolving
logic looks further up the node hierarchy and stops with the first
privilegeable ancestor of the current node. All nodes potentially
inherit from the <emphasis role="bold">workspace</emphasis> root
node.</para>
-
<para>The owner of a node is inherited in accordance with the same
logic: If the node has no owner, the owner information of the closest
owneable ancestor is inherited.</para>
-
- <para>This inheritance is implemented by browsing up the node's
+ <para>This inheritance is implemented by browsing up the node's
hierarchy. At access time, if the node does not have owner or
- permissions, the system looks up into the node's ancestor hierarchy
+ permissions, the system looks up into the node's ancestor hierarchy
for the <emphasis role="bold">first</emphasis> ACL.</para>
</section>
-
<section>
<title>Default ACL of the root node</title>
-
<para>When no matching ACL is found in the ancestor hierarchy, the
- system may end up looking at the root node's ACL. As ACL are optional,
+ system may end up looking at the root node's ACL. As ACL are optional,
even for the root node, if the root node has no ACL, the following
- rule is ultimately applied to resolve privileges :</para>
-
+ rule is ultimately applied to resolve privileges:</para>
<itemizedlist>
<listitem>
<para><emphasis role="bold">any</emphasis> identity (any
@@ -274,293 +213,200 @@
</itemizedlist>
</section>
</section>
-
<section>
<title>Notes</title>
-
- <para><emphasis role="bold">Access Control nodetypes are not
- extendible:</emphasis> The access control mechanism works for <emphasis
- role="bold">exo:owneable</emphasis> and <emphasis
- role="bold">exo:privilegeable</emphasis> nodetypes only, not for their
- subtypes! So you can NOT extend those nodetypes.</para>
-
+ <para><emphasis role="bold">Access Control nodetypes are not extendible:</emphasis> The access control mechanism works for <emphasis role="bold">exo:owneable</emphasis> and <emphasis role="bold">exo:privilegeable</emphasis> nodetypes only, not for their
+ subtypes! So you cannot extend those nodetypes.</para>
<para><emphasis role="bold">Autocreation:</emphasis> By default, newly
- created nodes are neither <emphasis
- role="bold">exo:privilegeable</emphasis> nor <emphasis
- role="bold">exo:owneable</emphasis> but it is possible to configure the
- repository to auto-create <emphasis
- role="bold">exo:privilegeable</emphasis> or/and <emphasis
- role="bold">exo:owneable</emphasis> thanks to eXo's JCR interceptors
- extension (see <link linkend="JCR.Extensions">JCR
- Extensions</link>)</para>
-
+ created nodes are neither <emphasis role="bold">exo:privilegeable</emphasis> nor <emphasis role="bold">exo:owneable</emphasis> but it is possible to configure the
+ repository to auto-create <emphasis role="bold">exo:privilegeable</emphasis> or/and <emphasis role="bold">exo:owneable</emphasis> thanks to eXo's JCR interceptors
+ extension (see <link linkend="JCR.Extensions">JCR Extensions</link>)</para>
<para><emphasis role="bold">OR-based Privilege Inheritance</emphasis>:
- Note, that eXo's Access Control implementation supports a privilege
+ Note, that eXo's Access Control implementation supports a privilege
inheritance that follows a strategy of either...or/ and has only an
ALLOW privilege mechanism (there is no DENY feature). This means that a
- session is allowed to perform some operation on some nodes if its
+ session is allowed to perform some operations on some nodes if its
identity has an appropriate permission assigned to this node. Only if
there is no exo:permission property assigned to the node itself, the
- permissions of the node's ancestors are used.</para>
+ permissions of the node's ancestors are used.</para>
</section>
-
<section>
<title>Example</title>
-
<section>
<title>XML Example</title>
-
- <para>In the following example, you see a node named "Politics" which
- contains two nodes named "Cats" and "Dogs".</para>
-
+ <para>In the following example, you see a node named "Politics" which
+ contains two nodes named "Cats" and "Dogs".</para>
<note>
- <para>These examples are exported from eXo DMS using the \"document
- view\" representation of JCR. Each value of a multivalue property is
+ <para>These examples are exported from eXo DMS using the \"document
+ view\" representation of JCR. Each value of a multi-value property is
separated by a whitespace, each whitespace is escaped by
<emphasis>x0020</emphasis>.</para>
</note>
+ <programlisting><Politics jcr:primaryType="nt:unstructured" jcr:mixinTypes="exo:owneable exo:datetime exo:privilegeable" exo:dateCreated="2009-10-08T18:02:43.687+02:00"
+exo:dateModified="2009-10-08T18:02:43.703+02:00"
+exo:owner="root"
+exo:permissions="any_x0020_read *:/platform/administrators_x0020_read *:/platform/administrators_x0020_add_node *:/platform/administrators_x0020_set_property *:/platform/administrators_x0020_remove">
- <programlisting><Politics jcr:primaryType="nt:unstructured" jcr:mixinTypes="exo:owneable exo:datetime exo:privilegeable" exo:dateCreated="2009-10-08T18:02:43.687+02:00"
-exo:dateModified="2009-10-08T18:02:43.703+02:00"
-exo:owner="root"
-exo:permissions="any_x0020_read *:/platform/administrators_x0020_read *:/platform/administrators_x0020_add_node *:/platform/administrators_x0020_set_property *:/platform/administrators_x0020_remove">
+<Cats jcr:primaryType="exo:article"
+jcr:mixinTypes="exo:owneable"
+exo:owner="marry"
+exo:summary="The_x0020_secret_x0020_power_x0020_of_x0020_cats_x0020_influences_x0020_the_x0020_leaders_x0020_of_x0020_the_x0020_world."
+exo:text="" exo:title="Cats_x0020_rule_x0020_the_x0020_world" />
-<Cats jcr:primaryType="exo:article"
-jcr:mixinTypes="exo:owneable"
-exo:owner="marry"
-exo:summary="The_x0020_secret_x0020_power_x0020_of_x0020_cats_x0020_influences_x0020_the_x0020_leaders_x0020_of_x0020_the_x0020_world."
-exo:text="" exo:title="Cats_x0020_rule_x0020_the_x0020_world" />
+<Dogs jcr:primaryType="exo:article"
+jcr:mixinTypes="exo:privilegeable"
+exo:permissions="manager:/organization_x0020_read manager:/organization_x0020_set_property"
+exo:summary="Dogs"
+exo:text="" exo:title="Dogs_x0020_are_x0020_friends" />
-<Dogs jcr:primaryType="exo:article"
-jcr:mixinTypes="exo:privilegeable"
-exo:permissions="manager:/organization_x0020_read manager:/organization_x0020_set_property"
-exo:summary="Dogs"
-exo:text="" exo:title="Dogs_x0020_are_x0020_friends" />
-
</Politics></programlisting>
-
- <para>The "Politics" node is <emphasis
- role="bold">exo:owneable</emphasis> and <emphasis
- role="bold">exo:privilegeable</emphasis>. It has both an <emphasis
- role="bold">exo:owner</emphasis> property and also an <emphasis
- role="bold">exo:permissions</emphasis> property. There is an <emphasis
- role="bold">exo:owner="root"</emphasis> property so that the user root
- is the owner. In the exo:permissions value you can see the ACL, a list
- of access controls. In this example, the group <emphasis
- role="bold">\</emphasis>:/platform/administrators* has all rights on
- this node (remember that the "\*" means any kind of membership/role).
- Furthermore, <emphasis role="bold">any</emphasis> has the read
- permission.</para>
-
- <para>As you can see in the jcr:mixinTypes property the "Cats" node is
- <emphasis role="bold">exo:owneable</emphasis>; hence there is an
- <emphasis role="bold">exo:owner="marry"</emphasis> property so that
- the user marry is the owner. The "Cats" node is <emphasis
- role="bold">not exo:privilegeable</emphasis> and has <emphasis
- role="bold">no exo:permissions</emphasis>. In this case, the <emphasis
- role="bold">inheritance mechanism</emphasis> enters the game: The
- "Cats" node has the same permissions as "Politics" node.</para>
-
- <para>Finally, the "Dogs" node is also a child node of "Politics".
- This node is <emphasis role="bold">not exo:owneable</emphasis> and
- inherits the owner of the "Politics" node (which is the user root).
- Otherwise, "Dogs" is <emphasis
- role="bold">exo:privilegeable</emphasis> and therefore has its own
+ <para>The "Politics" node is <emphasis role="bold">exo:owneable</emphasis> and <emphasis role="bold">exo:privilegeable</emphasis>. It has both an <emphasis role="bold">exo:owner</emphasis> property and an <emphasis role="bold">exo:permissions</emphasis> property. There is an <emphasis role="bold">exo:owner="root"</emphasis> property so that the user root
+ is the owner. In the exo:permissions value, you can see the ACL that is a list
+ of access controls. In this example, the group <emphasis role="bold">*:/platform/administrators</emphasis> has all rights on
+ this node (remember that the "<emphasis role="bold">*</emphasis>" means any kind of membership).
+ <emphasis role="bold">any</emphasis> means that any users also have the read
+ permission.s</para>
+ <para>As you see in the jcr:mixinTypes property, the "Cats" node is
+ <emphasis role="bold">exo:owneable</emphasis> and there is an
+ <emphasis role="bold">exo:owner="marry"</emphasis> property so that
+ the user marry is the owner. The "Cats" node is <emphasis role="bold">not exo:privilegeable</emphasis> and has <emphasis role="bold">no exo:permissions</emphasis>. In this case, we can see the <emphasis role="bold">inheritance mechanism</emphasis> here is that the
+ "Cats" node has the same permissions as "Politics" node.</para>
+ <para>Finally, the "Dogs" node is also a child node of "Politics".
+ This node is <emphasis role="bold">not</emphasis> <emphasis role="bold">exo:owneable</emphasis> and
+ inherits the owner of the "Politics" node (which is the user root).
+ Otherwise, "Dogs" is <emphasis role="bold">exo:privilegeable</emphasis> and therefore, it has its own
<emphasis role="bold">exo:permissions</emphasis>. That means only the
- users having a "manager" role in the group "/organization" and the
- user "root" have the rights to access this node - all others have no
- access rights.</para>
+ users having a "manager" role in the group "/organization" and the
+ user "root" have the rights to access this node.</para>
</section>
-
<section>
<title>Inheritance Examples</title>
-
<para>Here is an example showing the accessibility of two nodes (to
- show inheritance) for two sample users named <emphasis
- role="bold">manager</emphasis> and <emphasis
- role="bold">user</emphasis>:</para>
-
- <para>The "+" symbol means that there is a child node
- "exo:owneable".</para>
-
+ show inheritance) for two sample users named <emphasis role="bold">manager</emphasis> and <emphasis role="bold">user</emphasis>:</para>
+ <para>The "+" symbol means that there is a child node
+ "exo:owneable".</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/other/acl.gif" />
+ <imagedata fileref="images/other/acl.gif"/>
</imageobject>
</mediaobject>
</section>
-
<section>
<title>Permission validation</title>
-
- <para>There is a description how permission is validated for different
- jcr actions</para>
-
+ <para>This session describes how permission is validated for different
+ JCR actions.</para>
<itemizedlist>
<listitem>
- <para><emphasis role="bold">read node</emphasis>: check read
- permission on target node.</para>
-
- <para>For example. Read /node1/<emphasis
- role="bold">subnode</emphasis> node - jcr will check "read"
- permission exactly on "subnode".</para>
+ <para><emphasis role="bold">read node</emphasis>: Check the read
+ permission on a target node.</para>
+ <para>For example: Read /node1/<emphasis role="bold">subnode</emphasis> node, JCR will check the "read"
+ permission exactly on "subnode".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">read property</emphasis> : check read
- permission on parent node.</para>
-
- <para>For example. Read /<emphasis
- role="bold">node1</emphasis>/myprop - jcr will check "read"
- permission on "node1".</para>
+ <para><emphasis role="bold">read property</emphasis> : Check the read
+ permission on a parent node.</para>
+ <para>For example: Read /<emphasis role="bold">node1</emphasis>/myprop - JCR will check the "read"
+ permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">add node</emphasis>: check add_node on
- parent node</para>
-
- <para>For example. Try to add /<emphasis
- role="bold">node1</emphasis>/sybnode node - jcr will check
- "add_node" permission on "node1".</para>
+ <para><emphasis role="bold">add node</emphasis>: Check add_node on a parent node.</para>
+ <para>For example: Add /<emphasis role="bold">node1</emphasis>/subnode node, JCR will check the
+ "add_node" permission on "node1".</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">set property</emphasis>: set_property
- on parent node</para>
-
- <para>For example. Try to set /<emphasis
- role="bold">node1</emphasis>/myprop property - jcr will check
- "set_property" permission on "node1".</para>
+ on a parent node.</para>
+ <para>For example: Try to set /<emphasis role="bold">node1</emphasis>/myprop property, JCR will check
+ the "set_property" permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">remove node</emphasis>: check remove
- permission on target node.</para>
-
- <para>For example. Try to remove /node1/<emphasis
- role="bold">subnode</emphasis> node - jcr will check "remove"
- permission on "subnode".</para>
+ <para><emphasis role="bold">remove node</emphasis>: Check the remove
+ permission on a target node.</para>
+ <para>For example: Try to remove /node1/<emphasis role="bold">subnode</emphasis> node, JCR will check the "remove"
+ permission on "subnode".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">remove property</emphasis>: check
- remove permission on parent node</para>
-
- <para>For example. Try to remove /<emphasis
- role="bold">node1</emphasis>/myprop property - jcr will check
- "remove" permission on "node1".</para>
+ <para><emphasis role="bold">remove property</emphasis>: Check the
+ remove permission on a parent node.</para>
+ <para>For example: Try to remove /<emphasis role="bold">node1</emphasis>/myprop property, JCR will check
+ the "remove" permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">add mixin</emphasis>: check "add_node"
- and "set_property" permission on target node</para>
-
- <para>For example. Try add mixin to /node1/<emphasis
- role="bold">subnode</emphasis> node - jcr will check "add_node"
- and "set_property" permission on "subnode".</para>
+ <para><emphasis role="bold">add mixin</emphasis>: Check the "add_node"
+ and "set_property" permission on a target node.</para>
+ <para>For example: Try to add mixin to /node1/<emphasis role="bold">subnode</emphasis> node, JCR will check the "add_node"
+ and "set_property" permission on "subnode".</para>
</listitem>
</itemizedlist>
-
<note>
- <para>Behavior of the permission "remove" and "add mixin" validation
+ <para>The behavior of the permission "remove" and "add mixin" validation
has changed since JCR 1.12.6-GA. The old behavior is:</para>
-
<para><itemizedlist>
<listitem>
- <para><emphasis role="bold">remove node</emphasis>: check
- remove permission on parent node</para>
-
- <para>For example. Try to remove /<emphasis
- role="bold">node1</emphasis>/subnode node - jcr will check
- "remove" permission on "node1".</para>
+ <para><emphasis role="bold">remove node</emphasis>: Check
+ the remove permission on a parent node.</para>
+ <para>For example: Try to remove /<emphasis role="bold">node1</emphasis>/subnode node, JCR will check
+ the "remove" permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">add mixin</emphasis>: check
- "add_node" and "set_property" permission on parent node</para>
-
- <para>For example. Try add mixin to /<emphasis
- role="bold">node1</emphasis>/subnode node - jcr will check
- "add_node" and "set_property" permission on "node1".</para>
+ <para><emphasis role="bold">add mixin</emphasis>: Check
+ the "add_node" and "set_property" permission on a parent node.</para>
+ <para>For example: Try to add mixin to /<emphasis role="bold">node1</emphasis>/subnode node, JCR will check
+ the "add_node" and "set_property" permission on "node1".</para>
</listitem>
</itemizedlist></para>
</note>
</section>
</section>
-
<section>
<title>Java API</title>
-
- <para>eXo JCR's ExtendedNode interface which extends javax.jcr.Node
+ <para>eXo JCR's ExtendedNode interface which extends javax.jcr.Node
interface provides additional methods for Access Control
management.</para>
-
<table>
<title>Additional methods</title>
-
<tgroup cols="2">
<thead>
<row>
<entry>Method signature</entry>
-
<entry>Description</entry>
</row>
</thead>
-
<tbody>
<row>
- <entry>void setPermissions(Map<String, String[]>
- permissions)</entry>
-
+ <entry>void setPermissions(Map<String, String[]> permissions)</entry>
<entry>Assigns a set of Permissions to a node</entry>
</row>
-
<row>
- <entry>void setPermission(String identity, String[]
- permission)</entry>
-
- <entry>Assigns some Identity's Permission to a node</entry>
+ <entry>void setPermission(String identity, String[] permission)</entry>
+ <entry>Assigns some Identities' Permission to a node</entry>
</row>
-
<row>
<entry>void removePermission(String identity)</entry>
-
- <entry>Remove Identity's Permission</entry>
+ <entry>Removes an Identity's Permission</entry>
</row>
-
<row>
- <entry>void removePermission(String identity, String
- permission)</entry>
-
- <entry>Remove the specified permission for a particular
- identity</entry>
+ <entry>void removePermission(String identity, String permission)</entry>
+ <entry>Removes the specified permission for a particular identity</entry>
</row>
-
<row>
<entry>void clearACL()</entry>
-
<entry>Clears the current ACL so it becomes default</entry>
</row>
-
<row>
<entry>AccessControlList getACL()</entry>
-
<entry>Returns the current ACL</entry>
</row>
-
<row>
<entry>void checkPermission(String actions)</entry>
-
- <entry>Checks Permission (AccessDeniedException will be thrown
- if denied)</entry>
+ <entry>Checks Permission (AccessDeniedException will be thrown if denied)</entry>
</row>
</tbody>
</tgroup>
</table>
-
- <para>The "identity" parameter is the user or group name. The
+ <para>The "identity" parameter is a user or a group name. The
permissions are the literal strings of the standard action permissions
- (add_node, set_property, remove, read.</para>
+ (add_node, set_property, remove, read).</para>
</section>
</section>
</chapter>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,77 +1,58 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.WebDAV">
- <?dbhtml filename="ch-webdav.html"?>
-
- <title>WebDAV</title>
-
+<?dbhtml filename="ch-webdav.html"?> <title>WebDAV</title>
<section>
<title>Related documents</title>
-
<itemizedlist>
<listitem>
- <para><link linkend="JCR.LinkProducerService">Link
- Producer</link></para>
+ <para><link linkend="JCR.LinkProducerService">Link Producer</link></para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>Introduction</title>
-
- <para>The WebDAV protocol allows you to use third party tools to
+ <para>The WebDAV protocol enables you to use the third party tools to
communicate with hierarchical content servers via HTTP. It is possible to
add and remove documents or a set of documents from a path on the server.
- DeltaV is an extension of the WebDav protocol that allows to manage
+ DeltaV is an extension of the WebDav protocol that allows managing
document versioning. Locking guarantees protection against multiple access
- when writing resources. The ordering support allows to change the position
- of the resource in the list and sort the directory for the convenience of
- viewing the directory tree. The full-text search makes it easy to find the
+ when writing resources. The ordering support allows changing the position
+ of the resource in the list and sort the directory to make the directory tree viewed conveniently. The full-text search makes it easy to find the
necessary documents. You can search by using two languages: SQL and
XPATH.</para>
-
<para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
from the extension modules of the reference implementation - on the top of
our JCR implementation so that it is possible to browse a workspace using
the third party tools (it can be Windows folders or Mac ones as well as a
- Java WebDAV client such as DAVExplorer or IE using File->Open as a Web
+ Java WebDAV client, such as DAVExplorer or IE using File->Open as a Web
Folder).</para>
-
<para>Now WebDav is an extension of the REST service. To get the WebDav
server ready, you must deploy the REST application. Then, you can access
any workspaces of your repository by using the following URL:</para>
-
<para>Standalone mode:</para>
-
<para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
-
<para>Portal mode:</para>
-
<para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}...</uri></para>
-
- <para>When accessing the WebDAV server - here URL is
- <uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
- also use "collaboration" (instead of "production") which is the default
- workspace in eXo products - the user will be asked to enter his login and
+ <para>When accessing the WebDAV server with the URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
+ also use "collaboration" (instead of "production") which is the default
+ workspace in eXo products. You will be asked to enter your login and
password. Those will then be checked by using the organization service
- (that can be implemented thanks to an Inmemory(dummy) module or DB module
- or LDAP one) and the JCR user session will be created with the correct JCR
+ that can be implemented thanks to an InMemory (dummy) module or a DB module
+ or an LDAP one and the JCR user session will be created with the correct JCR
Credentials.</para>
-
- <para><emphasis role="bold">NOTE:</emphasis> If you try the "in ECM"
- option, add "@ecm" to the user's password. Alternatively, you may modify
- jaas.conf adding the <emphasis role="bold">domain=ecm</emphasis> option
- like:</para>
-
- <programlisting>exo-domain {
+ <note>
+ <para>If you try the "in ECM"
+ option, add "@ecm" to the user's password. Alternatively, you may modify
+ jaas.conf by adding the <emphasis role="bold">domain=ecm</emphasis> option
+ as follows:</para>
+ <programlisting>exo-domain {
org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
};</programlisting>
+ </note>
</section>
-
<section>
<title>Configuration</title>
-
<programlisting><component>
<key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
<type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
@@ -87,7 +68,7 @@
<!-- this is the value of WWW-Authenticate header -->
<value-param>
<name>auth-header</name>
- <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
+ <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
</value-param>
<!-- default node type which is used for the creation of collections -->
@@ -102,7 +83,7 @@
<value>nt:file</value>
</value-param>
- <!-- if MimeTypeResolver can't find the required mime type,
+ <!-- if MimeTypeResolver can't find the required mime type,
which conforms with the file extension, and the mimeType header is absent
in the HTTP request header, this parameter is used
as the default mime type-->
@@ -112,9 +93,9 @@
</value-param>
<!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
- In case of "create-version", PUT command creates the new version of the resource if this resource exists.
- In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
- In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
+ In case of "create-version", PUT command creates the new version of the resource if this resource exists.
+ In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
+ In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
<value-param>
<name>update-policy</name>
@@ -125,8 +106,8 @@
<!--
This parameter determines how service responds to a method that attempts to modify file content.
- In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
- In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
+ In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
+ In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
-->
<value-param>
<name>auto-version</name>
@@ -136,13 +117,13 @@
<!--
This parameter is responsible for managing Cache-Control header value which will be returned to the client.
- You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
+ You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
-->
<value-param>
<name>cache-control</name>
<value>text/xml,text/html:max-age=3600;image/png,image/jpg:max-age=1800;*/*:no-cache;</value>
</value-param>
-
+
<!--
This parameter determines the absolute path to the folder icon file, which is shown
during WebDAV view of the contents
@@ -155,248 +136,170 @@
</init-params
</component></programlisting>
</section>
-
<section>
<title>Screenshots</title>
-
- <para>At present, eXo JCR WebDav server was tested by using MS Internet
- Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav
- Explorer</ulink>, <ulink
- url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos
- Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
-
+ <para>At present, eXo JCR WebDav server is tested by using MS Internet
+ Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav Explorer</ulink>, <ulink url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
<section>
<title>MS Internet Explorer</title>
-
<para>(File -> Open as Web Folder)</para>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_explorer.jpg" />
+ <imagedata fileref="images/protocols/webdav_explorer.jpg"/>
</imageobject>
</mediaobject>
</section>
-
<section>
<title>Dav Explorer</title>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_davexplorer.jpg" />
+ <imagedata fileref="images/protocols/webdav_davexplorer.jpg"/>
</imageobject>
</mediaobject>
</section>
-
<section>
<title>Xythos Drive</title>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_xythosdrive.jpg" />
+ <imagedata fileref="images/protocols/webdav_xythosdrive.jpg"/>
</imageobject>
</mediaobject>
</section>
-
<section>
<title>Microsoft Office 2003</title>
-
<para>(as client) (File->Open with typing http://... href in the file
name box)</para>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_msoffice2003.jpg" />
+ <imagedata fileref="images/protocols/webdav_msoffice2003.jpg"/>
</imageobject>
</mediaobject>
</section>
-
<section>
<title>Ubuntu Linux</title>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg" />
+ <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg"/>
</imageobject>
</mediaobject>
</section>
</section>
-
<section>
<title>Comparison table of WebDav and JCR commands</title>
-
<table>
- <title></title>
-
+ <title/>
<tgroup cols="2">
<thead>
<row>
<entry>WebDav</entry>
-
<entry>JCR</entry>
</row>
</thead>
-
<tbody>
<row>
<entry>COPY</entry>
-
<entry>Workspace.copy(...)</entry>
</row>
-
<row>
<entry>DELETE</entry>
-
<entry>Node.remove()</entry>
</row>
-
<row>
<entry>GET</entry>
-
<entry>Node.getProperty(...); Property.getValue()</entry>
</row>
-
<row>
<entry>HEAD</entry>
-
<entry>Node.getProperty(...); Property.getLength()</entry>
</row>
-
<row>
<entry>MKCOL</entry>
-
<entry>Node.addNode(...)</entry>
</row>
-
<row>
<entry>MOVE</entry>
-
<entry>Session.move(...) or Workspace.move(...)</entry>
</row>
-
<row>
<entry>PROPFIND</entry>
-
- <entry>Session.getNode(...); Node.getNode(...);
- Node.getNodes(...); Node.getProperties()</entry>
+ <entry>Session.getNode(...); Node.getNode(...); Node.getNodes(...); Node.getProperties()</entry>
</row>
-
<row>
<entry>PROPPATCH</entry>
-
- <entry>Node.setProperty(...);
- Node.getProperty(...).remove()</entry>
+ <entry>Node.setProperty(...); Node.getProperty(...).remove()</entry>
</row>
-
<row>
<entry>PUT</entry>
-
- <entry>Node.addNode("node","nt:file");
- Node.setProperty("jcr:data", "data")</entry>
+ <entry>Node.addNode("node","nt:file"); Node.setProperty("jcr:data", "data")</entry>
</row>
-
<row>
<entry>CHECKIN</entry>
-
<entry>Node.checkin()</entry>
</row>
-
<row>
<entry>CHECKOUT</entry>
-
<entry>Node.checkout()</entry>
</row>
-
<row>
<entry>REPORT</entry>
-
- <entry>Node.getVersionHistory(); VersionHistory.getAllVersions();
- Version.getProperties()</entry>
+ <entry>Node.getVersionHistory(); VersionHistory.getAllVersions(); Version.getProperties()</entry>
</row>
-
<row>
<entry>RESTORE</entry>
-
<entry>Node.restore(...)</entry>
</row>
-
<row>
<entry>UNCHECKOUT</entry>
-
<entry>Node.restore(...)</entry>
</row>
-
<row>
<entry>VERSION-CONTROL</entry>
-
- <entry>Node.addMixin("mix:versionable")</entry>
+ <entry>Node.addMixin("mix:versionable")</entry>
</row>
-
<row>
<entry>LOCK</entry>
-
<entry>Node.lock(...)</entry>
</row>
-
<row>
<entry>UNLOCK</entry>
-
<entry>Node.unlock()</entry>
</row>
-
<row>
<entry>ORDERPATCH</entry>
-
<entry>Node.orderBefore(...)</entry>
</row>
-
<row>
<entry>SEARCH</entry>
-
- <entry>Workspace.getQueryManager(); QueryManager.createQuery();
- Query.execute()</entry>
+ <entry>Workspace.getQueryManager(); QueryManager.createQuery(); Query.execute()</entry>
</row>
-
- <row>
- <entry>ACL</entry>
-
- <entry>Node.setPermission(...)</entry>
- </row>
</tbody>
</tgroup>
</table>
</section>
-
<section>
<title>Restrictions</title>
-
- <para>There are some restrictions for webdav in different Operating
+ <para>There are some restrictions for WebDAV in different Operating
systems.</para>
-
<section>
<title>Windows 7</title>
-
- <para>When you try to setup a web folder by “adding a network location”
+ <para>When you try to set up a web folder by “adding a network location”
or “map a network drive” through My Computer, you can get an error
- saying that either “The folder you entered does not appear to be valid.
+ message saying that either “The folder you entered does not appear to be valid.
Please choose another” or “Windows cannot access… Check the spelling of
- the name. Otherwise, there might be…”. These errors appear whether I’m
+ the name. Otherwise, there might be…”. These errors may appear when you are
using SSL or non-SSL.</para>
-
- <para>To fix this follow such steps:</para>
-
+ <para>To fix this, do as follows:</para>
<orderedlist>
<listitem>
- <para>Go to Windows Registry Editor</para>
+ <para>Go to Windows Registry Editor.</para>
</listitem>
-
<listitem>
<para>Find a key:
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
- </para>
+ .</para>
</listitem>
-
<listitem>
- <para>Change the value to 2 </para>
+ <para>Change the value to 2.</para>
</listitem>
</orderedlist>
</section>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml 2011-01-31 07:39:12 UTC (rev 3904)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml 2011-01-31 15:51:13 UTC (rev 3905)
@@ -1,142 +1,110 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="Kernel.JobSchedulerService">
- <?dbhtml filename="ch-job-scheduler-service.html"?>
-
- <title>Job Scheduler Service</title>
-
+<?dbhtml filename="ch-job-scheduler-service.html"?> <title>Job Scheduler Service</title>
<section>
- <title>What is Job Scheduler</title>
-
- <para><emphasis role="bold">Job scheduler</emphasis> defines a job to
- execute a given number of times during a given period. It is a a software
- application that is in charge of unattended background executions,
- commonly known for historical reasons as batch processing.</para>
-
- <para>Today's job schedulers typically provide a graphical user interface
- and a single point of control for definition and monitoring of background
- executions in a distributed network of computers. Increasingly job
- schedulers are required to orchestrate the integration of real-time
- business activities with traditional background IT processing, across
- different operating system platforms and business application
- environments.</para>
-
- <para>Some features that may be found in a job scheduler include:</para>
-
+ <title>What is Job Scheduler?</title>
+ <para><emphasis role="bold">Job scheduler</emphasis> defines a job to execute a given number of times during a given period. It is a service that is in charge of unattended background executions, commonly known for historical reasons as batch processing. It is used to create and run jobs automatically and continuously, to schedule event-driven jobs and reports.</para>
+ </section>
+ <section>
+ <title>Where is Job Scheduler Service used in eXo Products?</title>
+ <para>Job Scheduler Service is widely used in many eXo products such as Social, DMS, WCM, eXo Knowledge and eXo Collaboration.</para>
+ <para>In eXo products, Job Schedulers are used to do some tasks as below:</para>
<itemizedlist>
<listitem>
- <para>Continuously automatic monitoring of jobs and completion
- notification</para>
+ <para>Automatically send notification, such as task/event reminder in the Calendar application of eXo Collaboration. </para>
</listitem>
- </itemizedlist>
-
- <itemizedlist>
<listitem>
- <para>Event-driven job scheduling</para>
+ <para>Automatically save chat messages from Openfire Server to History in the Chat application of eXo Collaboration. </para>
</listitem>
- </itemizedlist>
-
- <itemizedlist>
<listitem>
- <para>Performance monitoring</para>
+ <para>Inactivate topics in the Forum application of eXo Knowledge.</para>
</listitem>
- </itemizedlist>
-
- <itemizedlist>
<listitem>
- <para>Report scheduling</para>
+ <para>Calculate the number of active and online users in the Forum application of eXo Knowledge.</para>
</listitem>
+ <listitem>
+ <para>Automatically collect RSS items from various RSS resources to post to the activity stream of users and spaces in eXo Social.</para>
+ </listitem>
+ <listitem>
+ <para>Automatically send Newsletters to users in WCM.</para>
+ </listitem>
</itemizedlist>
+ <para>Also, it is used in Schedule lifecycle in DMS.</para>
+ <para>By using Job Scheduler Service in eXo kernel, many kinds of job can be configured to run, such as, addPeriodJob, addCronJob, addGlobalJobListener, addJobListener and many more. Just write a job (a class implements Job interface of quartz library and configures plug-in for JobSchedulerService and you're done. </para>
</section>
-
<section>
<title>How does Job Scheduler work?</title>
-
<para>Jobs are scheduled to run when a given Trigger occurs. Triggers can
be created with nearly any combination of the following directives:</para>
-
<itemizedlist>
<listitem>
<para>at a certain time of day (to the millisecond)</para>
</listitem>
-
<listitem>
<para>on certain days of the week</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>on certain days of the month</para>
</listitem>
-
<listitem>
<para>on certain days of the year</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>not on certain days listed within a registered Calendar (such as
business holidays)</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>repeated a specific number of times</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>repeated until a specific time/date</para>
</listitem>
-
<listitem>
<para>repeated indefinitely</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>repeated with a delay interval</para>
</listitem>
</itemizedlist>
-
<para>Jobs are given names by their creator and can also be organized into
named groups. Triggers may also be given names and placed into groups, in
order to easily organize them within the scheduler. Jobs can be added to
the scheduler once, but registered with multiple Triggers. Within a J2EE
environment, Jobs can perform their work as part of a distributed (XA)
transaction.</para>
-
+ <para>(Source: quartz-scheduler.org) </para>
<section>
<title>How can Job Scheduler Service be used in Kernel?</title>
-
- <para>Kernel leverages <ulink
- url="http://www.quartz-scheduler.org">Quartz</ulink> for its scheduler
+ <para>Kernel leverages <ulink url="http://www.quartz-scheduler.org">Quartz</ulink> for its scheduler
service and wraps <classname>org.quartz.Scheduler</classname> in
<classname>org.exoplatform.services.scheduler.impl.QuartzSheduler</classname>
for easier service wiring and configuration like any other services. To
- work with Quartz in Kernel, you'll mostly work with
+ work with Quartz in Kernel, you will mostly work with
<classname>org.exoplatform.services.scheduler.JobSchedulerService</classname>
(implemented by
<classname>org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl</classname>.</para>
-
<para>To use <classname>JobSchedulerService</classname>, you can
configure it as a component in the configuration.xml. Because
<classname>JobSchedulerService</classname> requires
<classname>QuartzSheduler</classname> and
<classname>QueueTasks</classname>, you also have to configure these two
components.</para>
-
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
<type>org.exoplatform.services.scheduler.impl.QuartzSheduler</type>
@@ -153,45 +121,38 @@
</configuration></programlisting>
</section>
-
<section>
<title>Samples</title>
-
- <para>We will work with <classname>JobSchedulerService</classname> by
+ <note>
+ <para>You can download the project code from <ulink url="https://github.com/hoatle/job-scheduler-service-tutorial">here</ulink></para>
+ </note>
+ <para>Work with <classname>JobSchedulerService</classname> by
creating a sample project and use GateIn-3.1.0-GA for testing.</para>
-
- <para>Firstly, create a project:</para>
-
+ <para>Firstly, create a project by using maven archetype plugin:</para>
<programlisting>mvn archetype:generate
-//....
-Choose version:
-1: 1.0
-2: 1.0-alpha-1
-3: 1.0-alpha-2
-4: 1.0-alpha-3
-5: 1.0-alpha-4
-Choose a number: : 1
-Define value for property 'groupId': : org.exoplatform.samples
-Define value for property 'artifactId': : exo.samples.scheduler
-Define value for property 'version': 1.0-SNAPSHOT: 1.0-SNAPSHOT
-Define value for property 'package': org.exoplatform.samples: jar
-Confirm properties configuration:
-groupId: org.exoplatform.samples
-artifactId: exo.samples.scheduler
-version: 1.0-SNAPSHOT
-package: jar
-Y: Y</programlisting>
-
- <para>Choose version as <emphasis role="bold">1.0-SNAPSHOT</emphasis>,
- groupId as <emphasis role="bold">org.exoplatform.samples</emphasis>,
- artifactId as <emphasis role="bold">exo.samples.scheduler</emphasis> and
- package as <emphasis role="bold">jar</emphasis>. Edit the pom.xml as
- following:</para>
-
+</programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>For project type: select <emphasis role="bold">maven-archetype-quickstart </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For groupId: select <emphasis role="bold">org.exoplatform.samples</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For artifactId: select <emphasis role="bold">exo.samples.scheduler</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For version: select<emphasis role="bold"> 1.0.0-SNAPSHOT</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For package: select <emphasis role="bold">org.exoplatform.samples.scheduler</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>Edit the pom.xml as follows:</para>
<programlisting><project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -203,274 +164,169 @@
<groupId>org.exoplatform.samples</groupId>
<artifactId>exo.samples.scheduler</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<name>eXo Samples For Scheduler</name>
<description>eXo Samples Code For Scheduler</description>
- <dependencies>
-
- <dependency>
- <groupId>quartz</groupId>
- <artifactId>quartz</artifactId>
- <version>1.5.2</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.component.common</artifactId>
- <scope>provided</scope>
- </dependency>
-
- </dependencies>
-</project></programlisting>
-
- <para>After that, create a eclipse project and then import into
- eclipse:</para>
-
+</project> </programlisting>
+ <para>Generate an eclipse project by using maven eclipse plugin and then import into eclipse:</para>
<programlisting>mvn eclipse:eclipse</programlisting>
-
- <para>We'll work with this project all the time through samples.</para>
-
+ <para>eXo Kernel makes it easier to work with job scheduler service. All you need is just to define your "job" class to be performed by implementing <emphasis role="italic">org.quartz.Job</emphasis> interface and add configuration for it. </para>
<section>
- <title>StartableScheduler for DumbJob example</title>
+ <title>Define a job</title>
+ <para>To define a job, do as follows:</para>
+ <para>Define your job to be performed. For example, the job <emphasis role="italic">DumbJob</emphasis> is defined as follows:</para>
+ <programlisting>package org.exoplatform.samples.scheduler.jobs;
- <itemizedlist>
- <listitem>
- <para>See how it works on Quartz at: <ulink
- url="http://www.quartz-scheduler.org/docs/tutorial/TutorialLesson03.html">http://www.quartz-scheduler.org/docs/tutorial/TutorialLesson03.html</ulink></para>
- </listitem>
- </itemizedlist>
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
- <itemizedlist>
- <listitem>
- <para>Create a package in created project: conf/portal and add a
- configuration configuration.xml as follows:</para>
- </listitem>
- </itemizedlist>
+/**
+ * DumbJob for executing a defined dumb job.
+ */
+public class DumbJob implements Job {
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ /**
+ * The logger
+ */
+ private static final Log LOG = ExoLogger.getLogger(DumbJob.class);
+
+ /**
+ * The job of the DumbJob will be done by executing this method.
+ *
+ * @param context
+ * @throws JobExecutionException
+ */
+ public void execute(JobExecutionContext context) throws JobExecutionException {
+ LOG.info("DumbJob is executing...");
+ }
+}</programlisting>
+ <para>All jobs are required to implement the method <emphasis role="italic">execute</emphasis> from <emphasis role="italic">org.quartz.Job</emphasis> interface. This method will be called whenever a job is performed. With <emphasis role="italic">DumbJob</emphasis>, you just use logging to see that it will work. By looking at the terminal, you will see the the log message: "DumbJob is executing..."</para>
+ </section>
+ <section>
+ <title>Job configuration</title>
+ <para>After defining the "job", the only next step is to configure it by using <emphasis role="italic">external-component-plugin</emphasis> configuration for <emphasis role="italic">org.exoplatform.services.scheduler.JobSchedulerService</emphasis>. You can use these methods below for setting component plugin:</para>
+ <programlisting>public void addPeriodJob(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.PeriodJob</emphasis>. This type of job is used to perform actions that are executed in a period of time. You have to define when this job is performed, when it ends, when it performs the first action, how many times it is executed and the period of time to perform the action. See the configuration sample below to understand more clearly:</para>
+ <programlisting><external-component-plugins>
+ <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
+ <component-plugin>
+ <name>PeriodJob Plugin</name>
+ <set-method>addPeriodJob</set-method>
+ <type>org.exoplatform.services.scheduler.PeriodJob</type>
+ <description>period job configuration</description>
+ <init-params>
+ <properties-param>
+ <name>job.info</name>
+ <description>dumb job executed periodically</description>
+ <property name="jobName" value="DumbJob"/>
+ <property name="groupName" value="DumbJobGroup"/>
+ <property name="job" value="org.exoplatform.samples.scheduler.jobs.DumbJob"/>
+ <property name="repeatCount" value="0"/>
+ <property name="period" value="60000"/>
+ <property name="startTime" value="+45"/>
+ <property name="endTime" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins></programlisting>
+ <programlisting>public void addCronJob(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.CronJob</emphasis>. This type of job is used to perform actions at specified time with Unix 'cron-like' definitions. The plugin uses "expression" field for specifying the 'cron-like' definitions to execute the job. This is considered as the most powerful and flexible job to define when it will execute. For example, at 12pm every day => "0 0 12 * * ?"; or at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday => "0 15 10 ? * MON-FRI". To see more about Cron expression, please refer to this article: <para><ulink url="http://en.wikipedia.org/wiki/CRON_expression">CRON expression</ulink>.</para>See the configuration sample below to understand more clearly:</para>
+ <programlisting><external-component-plugins>
+ <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
+ <component-plugin>
+ <name>CronJob Plugin</name>
+ <set-method>addCronJob</set-method>
+ <type>org.exoplatform.services.scheduler.CronJob</type>
+ <description>cron job configuration</description>
+ <init-params>
+ <properties-param>
+ <name>job.info</name>
+ <description>dumb job executed by cron expression</description>
+ <property name="jobName" value="DumbJob"/>
+ <property name="groupName" value="DumbJobGroup"/>
+ <property name="job" value="org.exoplatform.samples.scheduler.jobs.DumbJob"/>
+ <!-- The job will be performed at 10:15am every day -->
+ <property name="expression" value="0 15 10 * * ?"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins></programlisting>
+ <programlisting>public void addGlobalJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting>public void addJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.JobListener.</emphasis> This job listener is used so that it will be informed when a <emphasis role="italic">org.quartz.JobDetail</emphasis> executes.</para>
+ <programlisting>public void addGlobalTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting>public void addTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.TriggerListener</emphasis>. This trigger listener is used so that it will be informed when a <emphasis role="italic">org.quartz.Trigger</emphasis> fires.</para>
+ </section>
+ <section>
+ <title>Run the project</title>
+ <para>Create <emphasis role="italic">conf.portal</emphasis> package in your sample project. Add the configuration.xml file with the content as follows:</para>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
<type>org.exoplatform.services.scheduler.impl.QuartzSheduler</type>
</component>
-
<component>
<type>org.exoplatform.services.scheduler.QueueTasks</type>
</component>
-
<component>
<key>org.exoplatform.services.scheduler.JobSchedulerService</key>
<type>org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl</type>
</component>
- <component>
- <type>org.exoplatform.samples.scheduler.StartableScheduler</type>
- </component>
-
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
+ <component-plugin>
+ <name>PeriodJob Plugin</name>
+ <set-method>addPeriodJob</set-method>
+ <type>org.exoplatform.services.scheduler.PeriodJob</type>
+ <description>period job configuration</description>
+ <init-params>
+ <properties-param>
+ <name>job.info</name>
+ <description>dumb job executed periodically</description>
+ <property name="jobName" value="DumbJob"/>
+ <property name="groupName" value="DumbJobGroup"/>
+ <property name="job" value="org.exoplatform.samples.scheduler.jobs.DumbJob"/>
+ <property name="repeatCount" value="0"/>
+ <property name="period" value="60000"/>
+ <property name="startTime" value="+45"/>
+ <property name="endTime" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
</configuration></programlisting>
+ <para><emphasis role="italic">mvn clean install </emphasis>the project. Copy .jar file to<emphasis role="italic"> lib</emphasis> in tomcat bundled with GateIn-3.1.0-GA. Run <emphasis role="italic">bin/gatein.sh</emphasis> to see the <emphasis role="italic">DumbJob</emphasis> to be executed on the terminal when portal containers are initialized. Please look at the terminal to see the log message of <emphasis role="italic">DumbJob</emphasis>.</para>
+ <para>From now on, you can easily create any job to be executed in GateIn's portal by defining your job and configuring it.
- <itemizedlist>
- <listitem>
- <para>Note: You can see a component: StartableSheduler to be
- defined. It's a component startable when portal containers are
- initialized.</para>
- </listitem>
- </itemizedlist>
-
- <programlisting>package org.exoplatform.samples.scheduler;
-
-import java.util.Date;
-
-import org.exoplatform.samples.scheduler.jobs.DumbJob;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.scheduler.impl.QuartzSheduler;
-import org.picocontainer.Startable;
-import org.quartz.JobDetail;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.Trigger;
-import org.quartz.TriggerUtils;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- * exo(a)exoplatform.com
- * Jul 1, 2010
- */
-public class StartableScheduler implements Startable {
- private static final Log LOG = ExoLogger.getLogger(StartableScheduler.class);
-
- public StartableScheduler(QuartzSheduler quartzScheduler) throws SchedulerException {
- LOG.info("Init StartableScheduler");
- JobDetail jobDetail = new JobDetail("myJob",
- Scheduler.DEFAULT_GROUP,
- DumbJob.class);
- Trigger trigger = TriggerUtils.makeImmediateTrigger(3, 5000);
- trigger.setStartTime(new Date());
- trigger.setName("myTrigger");
-
- Scheduler scheduler = quartzScheduler.getQuartzSheduler();
-
- scheduler.scheduleJob(jobDetail, trigger);
- }
-
- @Override
- public void start() {
- // TODO Auto-generated method stub
-
- }
- @Override
- public void stop() {
- // TODO Auto-generated method stub
-
- }
-}</programlisting>
-
- <itemizedlist>
- <listitem>
- <para>DumbJob is defined as a job:</para>
- </listitem>
- </itemizedlist>
-
- <programlisting>package org.exoplatform.samples.scheduler.jobs;
-
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-/**
- * DumbJob.java
- *
- * @author <a href="http://hoatle.net">hoatle (hoatlevan at gmail dot com)</a>
- * @since Jul 1, 2010
- * @copyright eXo SAS
- */
-public class DumbJob implements Job {
- private static final Log LOG = ExoLogger.getLogger(DumbJob.class);
- @Override
- public void execute(JobExecutionContext context) throws JobExecutionException {
- LOG.info("DumbJob is executing!");
- }
-
-}</programlisting>
-
- <para>mvn clean install the project. Copy jar file to lib in tomcat
- bundled with GateIn-3.1.0-GA. Run bin/gatein.sh to see the DumbJob
- executed on the terminal when portal containers are
- initialized.</para>
+</para>
</section>
</section>
-
- <section>
- <title>Where is Job Scheduler Service used in eXo Products?</title>
-
- <para>Job Service Scheduler (JSS) is used in many eXo products such as
- Social, DMS, WCM, KS and CS.</para>
-
- <para>For example: It is used in Schedule lifecycle in DMS.</para>
-
- <para>Also, it is used for News Letter Email Job in ECM, Reminder Job
- for calendar and History Job for chat in CS, Auto-count Active Users in
- KS.</para>
-
- <para>By using Job Scheduler Service in eXo kernel, many kinds of job
- can be configured to run. You can addPeriodJob, addCronJob,
- addGlobalJobListener, addJobListener and many more. Just write a job (a
- class implements Job interface of quartz library and config plugin for
- JobSchedulerService and you're done.</para>
- </section>
</section>
-
<section>
- <title>Advantages of Job Scheduler</title>
-
- <para>It's very useful to use Job Scheduler to create schedules for a lot
- of work, especially if they are spread across multiple machines. It's a
- tool to make that task a lot easier. Job Schedule is also widely used in
- almost eXo products such as: WCM, DMS, KS, CS, Social thanks to its
- benefits and advantages.</para>
-
- <itemizedlist>
- <listitem>
- <para>The Job Scheduler provides automatically log files for running
- programs</para>
- </listitem>
-
- <listitem>
- <para>The execution status of programs is automatically checked and an
- administrator will receive protocols by eMail</para>
- </listitem>
-
- <listitem>
- <para>The sequence of job starts can be organized depending on their
- execution status</para>
- </listitem>
-
- <listitem>
- <para>Job Schedulers are controlled by a graphical user
- interface</para>
- </listitem>
-
- <listitem>
- <para>Job Schedulers can be used to create complex job chains and job
- dependencies</para>
- </listitem>
- </itemizedlist>
-
- <para>Also, a wide variety of enterprise applications can take advantage
- of job schedulers. Job schedulers can enhance the functionality of
- enterprise applications as well as simplify their design. Furthermore, job
- scheduling components allow software development teams to focus on their
- applications and not on the intricate details of scheduling. By using
- server-side components, software teams can reduce development costs and
- bring their applications to market sooner.</para>
- </section>
-
- <section>
<title>Reference</title>
-
<para>To further understand about Job Scheduler, you can refer the
following links:</para>
-
<itemizedlist>
<listitem>
- <para><ulink
- url="http://www.quartz-scheduler.org/">http://www.quartz-scheduler.org/</ulink></para>
+ <para><ulink url="http://www.quartz-scheduler.org/">http://www.quartz-scheduler.org/</ulink></para>
</listitem>
-
<listitem>
- <para><ulink
- url="http://en.wikipedia.org/wiki/Job_scheduler">http://en.wikipedia.org/wiki/Job_scheduler</ulink></para>
+ <para><ulink url="http://en.wikipedia.org/wiki/Job_scheduler">http://en.wikipedia.org/wiki/Job_scheduler</ulink></para>
</listitem>
-
<listitem>
- <para><ulink
- url="http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...">http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...</ulink></para>
+ <para><ulink url="http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...">http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...</ulink></para>
</listitem>
-
<listitem>
- <para><ulink
- url="http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx</ulink></para>
+ <para><ulink url="http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx</ulink></para>
</listitem>
</itemizedlist>
</section>
13 years, 2 months
exo-jcr SVN: r3904 - jcr/tags/1.12.7-GA.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-31 02:39:12 -0500 (Mon, 31 Jan 2011)
New Revision: 3904
Added:
jcr/tags/1.12.7-GA/readme.txt
Log:
JCR-1575: add release notes
Added: jcr/tags/1.12.7-GA/readme.txt
===================================================================
--- jcr/tags/1.12.7-GA/readme.txt (rev 0)
+++ jcr/tags/1.12.7-GA/readme.txt 2011-01-31 07:39:12 UTC (rev 3904)
@@ -0,0 +1,496 @@
+JCR 1.12.7-GA release notes
+===========================
+
+eXoPlatform Java Content Repository (JSR-170) implementation and Extension services with clustering support.
+
+Features of this version:
+- Support easy restore into existing repository/workspace without manual cleaning database and value storage
+- Support more MS Office MIME types
+- Backup console binary distribution
+
+Changes of 1.12.7-GA
+=====================
+
+Bug
+ * [JCR-1483] - When a folder is cut server->client, folder on server doesn't remove.
+ * [JCR-1508] - Property not found dc:title during testing RandomReadNtFileWithMetadataTest
+ * [JCR-1529] - Node restore result depends on cache eviction
+ * [JCR-1541] - SessionDataManager.listChildPropertiesData(NodeData parent) must not return ValueDatas
+ * [JCR-1542] - XML elements are incorrectly parsed while using Woodstox XML processor
+ * [JCR-1544] - Exception error during edit content
+ * [JCR-1549] - Problems in JCR content after being imported
+ * [JCR-1552] - Corrupted data if the server is stopped while document is locked
+ * [JCR-1556] - The If-Modified-Since property in the HTTP header doesn't exist
+ * [JCR-1557] - If Groovy REST service deploy fails on JCR startup other workable services may not be deployed
+ * [JCR-1558] - FileCleaner is null in SysViewWorkspaceInitializer and BackupWorkapceInitializer
+ * [JCR-1564] - FORM authentication doesn't work with jcrbackup tool and Platform
+ * [JCR-1565] - Repository restore fails using exobackup tool with Component unregister error
+ * [JCR-1566] - Restored version nodes get id from jcr:uuid property instead fetch generated id
+ * [JCR-1574] - IncrementalBackupJob should be thread safe
+ * [WS-261] - Platform Packaging fails due to mistake in WS packaging JS file
+
+Documentation
+ * [JCR-1559] - Document databases supported by eXo JCR
+
+Improvement
+ * [JCR-1054] - Make Backup restore easier
+ * [JCR-1499] - Backup console binary distribution
+ * [JCR-1547] - Avoid to get an item from the DB if the parent node is new
+ * [JCR-1550] - Changes log traversing is under optimized
+ * [JCR-1567] - Code review of ACL managment in case of copy/moving nodes
+ * [JCR-1570] - DB clean on MySQL should not use iterating over all db
+ * [COR-217] - remove some unncessary jars
+ * [COR-218] - Support more MIME types
+ * [WS-258] - remove some unncessary jars
+
+Task
+ * [JCR-1463] - Lock operations does not checks any permission.
+ * [JCR-1502] - JCR backupset should be fully independent
+ * [JCR-1519] - Update XPath query ordering chapter in jcr documents
+ * [JCR-1568] - Check portability and compatibility backup in JCR 1.14.x and 1.12.x
+
+
+Changes of 1.12.6-GA
+=====================
+
+Bug
+ * [JCR-1497] - Backup console throws NPE if backup agent isn't deployed on server
+ * [JCR-1522] - Not correct MBean components registration when PortalContainer contains more then one repository
+ * [JCR-1527] - Create Group personnal folder should be after Group creation
+ * [JCR-1530] - Wrong Content-Type header for files over a certain size
+ * [JCR-1532] - MySQL-UTF8 dialect default collation can be case-insensitive - need case-sensitive set explicitly
+ * [JCR-1533] - Remove permission on child isn't used
+ * [JCR-1534] - Problem with uploading files via MacOS client
+ * [JCR-1539] - Webdav doesn't work on JBoss
+
+Improvement
+ * [JCR-1506] - Reduce contention on read in NodeTypeDataHierarchyHolder if possible
+ * [JCR-1523] - Avoid iterating over a List thanks to its iterator when it is possible [Part #2]
+
+Task
+ * [JCR-1521] - Adopt webdav-clients to eXo JCR 1.12.6-GA
+ * [JCR-1524] - Move JCR framework commands list configuration to it right place
+ * [JCR-1525] - Publish the reference guide in docbook format
+
+
+Changes of 1.12.6-CR02
+=====================
+
+Bug
+ * [JCR-1468] - Index already present error during cluster start
+ * [JCR-1504] - Indexer doesn't fully release resources on stop
+ * [JCR-1509] - Access Denied in jcr:content with anonim__ permission
+ * [JCR-1511] - WEBDav view in a webbrowser has hardcoded image links
+ * [JCR-1513] - Problems when start backup-console
+
+Improvement
+ * [JCR-1505] - Avoid iterating over a List thanks to its iterator when it is possible
+
+Task
+ * [JCR-1488] - Limit the total amount of WorkerThreads: apply patch
+
+Changes of 1.12.6-CR01
+=====================
+
+Bug
+ * [JCR-1470] - refresh breaks webdav published files
+ * [JCR-1482] - Corrupted Data if the server is stopped while somebobdy is editing a document in ECMS
+ * [JCR-1485] - Unknown error and strange behavior when mary edits a webcontent
+ * [JCR-1490] - Some Unit Tests on DB2 related to the CAS plugin fail
+ * [JCR-1494] - FTP server doesn't show list of workspaces after repository restoring
+
+Documentation
+ * [JCR-1433] - jcr backup/restore
+
+Improvement
+ * [KER-164] - Allow to use variables to define the realm, the rest context and the portal container name of a PortalContainerDefinition
+ * [WS-256] - Allow to use a String as entity for a JSON response
+ * [JCR-1459] - Whole Repository backup support in Backup Console tool
+ * [JCR-1469] - JCR clustering consumes lot of native threads
+ * [JCR-1491] - The result of the method getReferencesData is never stored into the cache
+
+Task
+ * [JCR-1489] - eXo JCR doesn't work with Oracle 11g R2 RAC
+ * [JCR-1495] - Bind slf4j-log4j and log4j dependencies onto the test phase of the various modules of JCR [part #2]
+
+Sub-task
+ * [JCR-1481] - Adding support form authentication in backup console
+
+Changes of 1.12.5-GA
+=====================
+
+Bug
+ * [KER-162] - Simple skin from examples folder doesn't appear at list
+ * [KER-163] - CachingContainer returns unregistered components
+ * [COR-213] - User logged-out and cannot login after some inactivity
+ * [WS-254] - Add org.exoplatform.services.rest.ext.method.filter.MethodAccessFilter in container configuration by default
+ * [JCR-1438] - Problem with JCR versionning
+ * [JCR-1449] - Can't get property of a node if it has a child node with the same name with the property
+ * [JCR-1450] - JCROrganizationService contains nodetype with same name as in CS
+ * [JCR-1453] - Missed nodetypes in cluster testing configuration
+ * [JCR-1462] - Problems during testing of backup on jcr 1.12.5-GA-SNAPSHOT
+ * [JCR-1466] - RepositoryException: URI is not hierarchical on remove workspace via backup console
+ * [JCR-1474] - NPE when try to import data via WorkspaceContentImporter
+
+Improvement
+ * [KER-160] - Prevent the JobSchedulerServiceImpl to launch jobs that rely on non started services in JBoss AS
+ * [KER-161] - Make the JobSchedulerServiceImpl support multi portal containers
+
+Task
+ * [JCR-1455] - Doc's title should be rename from eXoJCR Reference Manual to eXo JCR Developer Guide
+ * [JCR-1461] - Remove timestamp from names of jar-files in application bundles
+ * [JCR-1467] - Cannot use webdav service with a version of jcr:content
+ * [JCR-1471] - Updating eXo JCR version in ra.xml automatically
+ * [JCR-1472] - Adopt Backup client article
+ * [JCR-1473] - merge performance improvements
+
+Changes of 1.12.4-GA
+=====================
+
+Bug
+ * [EXOJCR-688] - Some entries in the eXo JCR cache are not evicted properly
+ * [EXOJCR-843] - Exceptions after importing file with version history
+ * [EXOJCR-849] - "Permission denied" on client side, when trying to move file(s) to another workspace through FTP
+ * [EXOJCR-856] - Problems while recopying same files via webdav
+ * [EXOJCR-865] - Data corrupt after restore a node which has been imported with version history
+ * [EXOJCR-878] - WebDAV doesn't work with nt:file
+ * [EXOJCR-879] - TestCaching.testNotModifiedSince failed in same cases
+ * [EXOJCR-888] - The problems with restore version node
+ * [EXOJCR-890] - JSON framework don't work with beans created in groovy
+ * [EXOJCR-891] - Snaphosts IDs make the applications build improperly
+ * [EXOJCR-908] - Used wrong delimiter during parsing permission value
+ * [EXOJCR-909] - In LDAPService, InitialContext is not safely closed in authenticate method
+ * [EXOJCR-912] - Unable to convert the JCR documentation to pdf
+ * [EXOJCR-916] - Duplicate instantiation of some services
+ * [EXOJCR-921] - Workspace.copy(srcWS, srcAbsPath, destAbsPath) can not copy root child to another workspace root child
+ * [EXOJCR-924] - Unable to coerce 'Event' into a LONG: java.lang.NumberFormatException: For input string: "Event"
+ * [EXOJCR-933] - Determine property type from nodetype definition in DocumentViewImport for version history.
+ * [EXOJCR-936] - Avoid converting binary value to String in tests
+
+Feature Request
+ * [EXOJCR-842] - Allow to disable a given PortalContainer
+ * [EXOJCR-880] - Determine property is multi or single value from nodetype definition in import.
+ * [EXOJCR-886] - Update the document handler to manage MS Office 2007 meta data extraction (docx, ...)
+ * [EXOJCR-934] - Decouple event name from listener name in ListenerService.
+ * [EXOJCR-935] - Add "dav:isreadonly" property management
+
+Task
+ * [EXOJCR-896] - Port Manageability article into docbook
+ * [EXOJCR-905] - Merge the reference guide and the user guide in one single guide
+ * [EXOJCR-913] - Abuse of INFO level logging for DocNumberCache.get()
+ * [EXOJCR-914] - excessive INFO logging by IndexMerger.run()
+ * [EXOJCR-915] - excessive INFO logging by IndexMerger.run()
+ * [EXOJCR-917] - core.packaging.module.js error when in deploy phase
+ * [EXOJCR-919] - maxVolatileTime should be checked on checkFlush()
+ * [EXOJCR-927] - Add "application/x-groovy+html" to HTMLDocumentReader and "application/x-jaxrs+groovy" to TextPlainDocumentReader
+ * [EXOJCR-892] - Remove Fake Chapters
+
+Changes of 1.12.3-GA
+=====================
+
+Bug
+ * [EXOJCR-754] - JDBC Statements left open : Use of Datasources instead of DBCP and C3P0 pools
+ * [EXOJCR-763] - Reordering samename sibling nodes does not update path of child nodes
+ * [EXOJCR-766] - QPath isDescendantOf returns wrong result on samename siblings
+ * [EXOJCR-774] - If-Modified-Since doesn't seem to be well managed in the Wevdav
+ * [EXOJCR-781] - LockManagerImpl should call InitialContextInitializer.recall
+ * [EXOJCR-784] - DOC : wrong examples in profiles section
+ * [EXOJCR-785] - Parameter maxVolatileTime is not working correctly
+ * [EXOJCR-788] - Inconsistency issue cans occur on default portal container parameters
+ * [EXOJCR-795] - Unexpected behavior of the method PortalContainer.isScopeValid()
+ * [EXOJCR-796] - Data corruption
+ * [EXOJCR-804] - "No such file or directory" exception for value storage when using MySQL or Postgres DB in WCM demo 2.0
+ * [EXOJCR-806] - Problems while copying "ftp-ftp"
+ * [EXOJCR-810] - TestRemoveFromValueStorage failed in configuration without ValueStorage
+ * [EXOJCR-813] - ItemImpl.getParent method must return session pooled parent
+ * [EXOJCR-817] - max-buffer-size from configuration should be use to TransientValueData in import (docview and sysview)
+ * [EXOJCR-835] - TestMultiDbJDBCConnection and TestSingleDbJDBCConnection must drop also JCR_xCONTAINER table on tearDown
+ * [EXOJCR-857] - Exception during PROPFIND request if some property content "%" and after not hex chracters
+ * [EXOJCR-865] - Data corrupt after restore a node which has been imported with version history
+ * [EXOJCR-882] - TestCaching fails on Windows XP SP 2 with Russian locale
+
+Feature Request
+ * [EXOJCR-230] - Refactore and move in main part of exo.ws.rest.core project class AbstractResourceTest
+ * [EXOJCR-782] - No longer force extension developers to redefine the whole dependencies list
+ * [EXOJCR-783] - Use cached table for HSLQLDB tables
+ * [EXOJCR-797] - Unable see error message from ProxyService if remote server does not provide Content-Type header.
+
+Task
+ * [EXOJCR-392] - Siblings reordering may update not all the child-items in cache
+ * [EXOJCR-751] - Prepare maintenance branch for jcr 1.12
+ * [EXOJCR-808] - For Sybase DB "check-sns-new-connection" should be set to false by default
+ * [EXOJCR-809] - OrganizationService's tests should not be excluded
+ * [EXOJCR-815] - Document how to use AS Managed DataSource
+ * [EXOJCR-867] - Port documentation for Kernel from wiki to docbook
+ * [EXOJCR-868] - Port documentation for Core from wiki to docbook
+ * [EXOJCR-869] - Port documentation for JCR from wiki to docbook
+ * [EXOJCR-870] - Cleanup WS documentation
+ * [EXOJCR-871] - Document RestServicesList service
+ * [EXOJCR-881] - Port functionality of EXOJCR-482 in jcr-1.12.x
+ * [EXOJCR-884] - Rename JCR documentation artifacts to exo.jcr.* form
+
+Changes of 1.12.2-GA
+====================
+
+Bug
+ * [EXOJCR-497] - JCR serialization test wrong logic with CASable storage
+ * [EXOJCR-730] - Restored repository not accessible after restart Tomcat
+ * [EXOJCR-731] - Deploy error (500 - Unexpected error. null) of REST Service with annotation inheritance.
+ * [EXOJCR-735] - JCR repositories created in runtime is not available after eXo Social restart
+ * [EXOJCR-736] - Problems with anonymous entrance on FTP and NPE
+ * [EXOJCR-743] - InitialContextBinder bind twice same datasource in some case
+ * [EXOJCR-762] - Check whether the repository with the given name doesn't exists before starting restore from backup
+
+Feature Request
+ * [EXOJCR-640] - Migrate to newer version of Apache PDFBox ( and FontBox ) if possible;
+
+Task
+ * [EXOJCR-596] - Upload eXoJCR documentation on jboss.org
+ * [EXOJCR-668] - Validate format of the default values of the property definition during the nodetype registration
+ * [EXOJCR-738] - Search does not work with source in CDATA tag in XML document
+ * [EXOJCR-740] - Constrains ranges are not used in NodeTypeImpl.canSetProperty() validation
+ * [EXOJCR-741] - Backupconsole build improvements
+ * [EXOJCR-765] - Use StringBuilder instead of String concatenation in MSExcelDocumentReader.getContentAsText
+ * [EXOJCR-681] - Decreasing perfomance while running WebdavReadWriteTest tests several times in row
+
+
+
+Changes of 1.12.2-CR1
+=====================
+
+Bug
+ * [EXOJCR-175] - Problems with HTTPBackupAgent - Cyrillic symbols aren't showing after restore
+ * [EXOJCR-683] - java.io.IOException: Socket read failed on heavy loaded WebdavAddBLOBTest benchmark test
+ * [EXOJCR-697] - SQL search by date doesn't work
+ * [EXOJCR-698] - URL encoding in SEARCH and PROPFIND responces differs.
+ * [EXOJCR-700] - Problem in user search with MySql and PostgresDB
+ * [EXOJCR-704] - JCR testuite hangs on sybase
+ * [EXOJCR-708] - Problem with full text searching in text files with non-latin content.
+ * [EXOJCR-712] - Concurrent service creation leads to duplicate service instantiation
+ * [EXOJCR-724] - Bad URL in the error message when a component cannot be instantiated
+ * [EXOJCR-726] - Improper conversion of jboss.server.config.url system property value into File (spaces in filename problem)
+ * [EXOJCR-729] - The FileNotFoundException in restore workspace over BackupWorkspaceinitializer
+ * [EXOJCR-734] - The binary values was not stored in incremental backup.
+
+Feature Request
+ * [EXOJCR-705] - Expose listeners in OrganizationService
+ * [EXOJCR-707] - Check repository management operations on thread safety
+ * [EXOJCR-718] - Allow to get the complete configuration at runtime
+ * [EXOJCR-719] - Better debugging of components loaded
+ * [EXOJCR-721] - Add possibility to use customized GroovyClassLoader in org.exoplatform.services.script.groovy.GroovyScriptInstantiator
+ * [EXOJCR-722] - Make it possible to use other then org.exoplatform.services.rest.impl.method.DefaultMethodInvoker
+
+Task
+ * [EXOJCR-354] - Invoke post read after permissions check
+ * [EXOJCR-663] - Make possibility extends classes RequestDispatcher and ResourceBinder.
+ * [EXOJCR-691] - Fix your missing dependencies
+ * [EXOJCR-692] - Find the reason why the method of type Node.hasNodes is much slower since beta5
+ * [EXOJCR-694] - Change JBC dependencies to use 3.2.4.GA
+ * [EXOJCR-696] - Reduce the concurrency Level in the JBoss Cache Config
+ * [EXOJCR-711] - Misleading error message appears when the external settings cannot be found
+ * [EXOJCR-714] - Improve the usability of the ContainerLifecyclePlugin
+ * [EXOJCR-715] - Ensure that the ExoContainer is fully ThreadSafe
+ * [EXOJCR-716] - Prevent the JobSchedulerServiceImpl to launch jobs that rely on non started services
+ * [EXOJCR-717] - Add to RestRegistryService method without repositoryName in PathParam, insted use current repository. Methods with repositoryName in PathParam marks as Deprecated.
+ * [EXOJCR-720] - Make possibility extends classe GroovyScript2RestLoader
+ * [EXOJCR-723] - JCR Statistics: Describe the arguments of the methods exposed through JMX
+ * [EXOJCR-728] - implementing RequestLifecycle for REST services
+
+
+Changes of 1.12.1-GA
+=====================
+
+Bug
+ * [EXOJCR-612] - JBoss Cache Implementation for the Cache Service test TestAbstractExoCache fails
+ * [EXOJCR-638] - get mixin types through the NodeTypeUtil class
+ * [EXOJCR-661] - Cannot access to the MBeans through the JConsole in Standalone mode
+ * [EXOJCR-662] - Processing SQLException may cause infinite loop.
+ * [EXOJCR-664] - org.exoplatform.services.jcr.impl.storage.value.fs.TestFileIOChannel.testConcurrentRead fail with MSSQL and DB2
+ * [EXOJCR-667] - Temporary spooled file can be not found on save
+ * [EXOJCR-671] - ConcurrentModificationException in FileCleaner with heavy load
+ * [EXOJCR-672] - An eXoCache clear should be local
+ * [EXOJCR-687] - Some JCR parameters that are time parameter are retrieved as number instead of time
+
+Feature Request
+ * [EXOJCR-498] - Provide more details when a JCR query is invalid
+ * [EXOJCR-634] - Upload of a file with special characters like " ' " in filename is not supported by the FTPservice
+ * [EXOJCR-645] - Add ExtHttpHeaders.JAXRS_BODY_PROVIDED header for unhandled exception in REST services and set error message to body responce
+
+Task
+ * [EXOJCR-578] - Use Fisheye in SCM urls used in maven
+ * [EXOJCR-611] - Provide a way to collect statistics around the JCR API accesses
+ * [EXOJCR-639] - Find the reason why the methods of type Property.setValue are much slower since beta5
+ * [EXOJCR-685] - Change JBC dependencies to use 3.2.3.GA
+ * [EXOJCR-689] - Standartize eXo JCR docnmentation projects description.
+ * [EXOJCR-690] - Apply changes in the eXo JCR project in order to be able to publish artifacts in the nexus of JBoss
+ * [EXOJCR-545] - Checking performance on SearchNodesByPropertyTest
+ * [EXOJCR-643] - Improve the performances of the lucene indexing in a cluster by removing contention for read operations
+
+
+Changes of 1.12.1-CR1
+=====================
+
+Bug
+ * [EXOJCR-256] - There are server errors "500 Internal Server Error:" during creation repository or workspace by RestRepositoryService
+ * [EXOJCR-348] - Test problem: TestCleanableFileStreamValueData failed
+ * [EXOJCR-519] - DAILY TESTS are going too long (avg time=5hours)
+ * [EXOJCR-531] - Problems with Lock operations
+ * [EXOJCR-546] - TESTING: Performance testing problems. LockUnlockOwnNodeTest - TPS fell down
+ * [EXOJCR-548] - problem with import & export node
+ * [EXOJCR-555] - NPE with cache eviction at startup
+ * [EXOJCR-557] - Problem while uploading *.pdf to WebDAV server using Mac OS Finder
+ * [EXOJCR-558] - Files uploaded by Mac OS finder are displayed with size "0"
+ * [EXOJCR-559] - Problems with daily performance testing - on PostgreSQL 8.2.9
+ * [EXOJCR-567] - The REST servlet dump errors when the client cut the socket too early should be only a debug log
+ * [EXOJCR-572] - Can not create workspace with default configuration of lock manager
+ * [EXOJCR-581] - Listing the directory in TreeFile may return null during race condition, causing NPE.
+ * [EXOJCR-584] - User's research is case sensitive
+ * [EXOJCR-586] - Missed slf4j dependency for jcr applications on tomcat AS
+ * [EXOJCR-587] - session.save() throws NPE after node reordering
+ * [EXOJCR-588] - Tests errors in eXo XML Processing Services on MACOS
+ * [EXOJCR-591] - Problem with ObservationManager
+ * [EXOJCR-599] - deadlock during dashboard editing
+ * [EXOJCR-600] - Concurrency problem (java.util.HashMap.put called from CacheableLockManagerImpl.getSessionLockManager(CacheableLockManagerImpl.java:473))
+ * [EXOJCR-601] - gatein sample extension should not be required
+ * [EXOJCR-602] - StackOverflow on JsonGeneratorImpl
+ * [EXOJCR-603] - impossible to change user password
+ * [EXOJCR-607] - Sybase Issue with GateIn
+ * [EXOJCR-608] - XaSessionImpl as XA resource should be unique per user, workspace and repository
+ * [EXOJCR-614] - Node.getReferences fail in some cases
+ * [EXOJCR-615] - Need check nodedata to avoid exception in method NodeImpl.isNodeType(String).
+ * [EXOJCR-619] - Log record forging (Security Issue)
+ * [EXOJCR-621] - Conflict between symlink feature and Jbosscache
+ * [EXOJCR-623] - Unable to get a version of document using WebDAV (HTTP Response 404 returned).
+ * [EXOJCR-633] - Problems with manual testing - tomcat-server on ftp -.IndexOutOfBoundsException
+
+Feature Request
+ * [EXOJCR-549] - Backup and Restore of a whole Repository
+ * [EXOJCR-571] - Change PersitedValueDataReader/Writer
+ * [EXOJCR-573] - Create database and bind DataSource in runtime
+ * [EXOJCR-582] - DB script modification for oracle11 compatibility
+ * [EXOJCR-585] - Allow to get statistics on Database Access without using a Profiler
+ * [EXOJCR-616] - Remove repository container from repositoryContainers map when repository container start fail.
+ * [EXOJCR-617] - Map environment parameters for all String fields in Repository configuration
+
+Task
+ * [EXOJCR-150] - Ftp client tests failute
+ * [EXOJCR-250] - Add human readable message in case Workspace creation error via HTTPBackupAgent
+ * [EXOJCR-393] - Create indexer load test
+ * [EXOJCR-523] - Upgrade to JBoss Cache 3.2.3.GA
+ * [EXOJCR-550] - Bind slf4j-log4j and log4j dependencies onto the test phase of the various modules of JCR
+ * [EXOJCR-552] - Allow to Test eXo JCR 1.12 on EC2
+ * [EXOJCR-575] - Remove unused PairChangesLog class
+ * [EXOJCR-589] - Limit network traffic and thread blocking for the Lucene Indexer in a cluster
+ * [EXOJCR-590] - DO NOT exclude tests from a parent pom
+ * [EXOJCR-598] - Allow to disable the hints used for the Complex Queries on oracle
+ * [EXOJCR-605] - Normalize logging categories
+ * [EXOJCR-631] - Find a reason, why functional tests fails under Tornado.MySQL with "Cannot create PoolableConnectionFactory (Too many connections)" message.
+ * [EXOJCR-632] - svn: File 'jcr.packaging.module/1.12.0-CP01/jcr.packaging.module-1.12.0-CP01.js' has inconsistent newlines
+
+
+Features of eXoJCR 1.12 comparing to 1.11
+=========================================
+
+- Repository clustering based on JBossCache and JBoss Transactions.
+- Lazy-load option for child nodes and properties read, improved items dataflow for read/write operations
+- Alternative data container optimized for read operations (consuming less database queries)
+- Database dialect can be autodetected (if not pointed in the configuration)
+- Support for Values large of 2GiB
+- Portal container configuration improvements (default definitions, link and externaly loaded parameters)
+- Concurrency improvements for Session registry and Values stroage
+- Concurrency improvements for XA transactions support (Repository login and logout faster now)
+- Improved serach based on Lucene 2.4
+- Support of MySQL/InnoDB database for multi-language content
+- Standalone container can use configuration stored in JBossAS server configuration directory by default
+- WebDAV server update-policy can be configured to different versioning behaviour
+- Lot of WebDAV server bugfixes
+- HTTP (RESTful) Backup agent with concole client
+- HTTP (RESTful) Repository management service
+- Support of Java6 and Java5 runtime and development environment
+
+Since version of 1.12 eXoJCR available under LGPL license (version 2.1).
+
+eXoJCR 1.12 tested in on the databases:
+ MySQL 5.1 MYSQL Connector/J 5.1.8
+ Oracle DB 10g (10.2.0.1) Oracle 10g (10.2.0.1)
+ PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-605
+ DB2 9,7 IBM Data Server Driver for JDBC and SQLJ (JCC Driver) Version: 9.1 (fixpack 3a)
+ MS SQL Server 2005 SP3 JDBC Driver 2.0
+ MS SQL Server 2008 SP1 JDBC Driver 2.0
+ Sybase 15.0.2 JConnect v6.0.5 (Build 26564 / 11 Jun 2009)
+
+
+Release includes:
+* eXo Kernel 2.2.7-GA
+* eXo Core 2.3.7-GA
+* eXo WS 2.1.7-GA
+* eXo JCR 1.12.7-GA
+
+1.12.6-GA tasks:
+* http://jira.exoplatform.org/browse/JCR/fixforversion/12392
+* http://jira.exoplatform.org/browse/WS/fixforversion/12395
+* http://jira.exoplatform.org/browse/COR/fixforversion/12393
+
+JCR Samples
+===========
+
+1. Start Up (Tomcat)
+ Tomcat 6 bundled can be started by executing the following commands:
+
+ $CATALINA_HOME\bin\eXo.bat run (Windows)
+
+ $CATALINA_HOME/bin/eXo.sh run (Unix)
+
+2. After startup, the sample applications will be available by visiting:
+
+ http://localhost:8080/browser - Simple JCR browser
+ Browse the JCR repository that was started with Tomcat
+ http://localhost:8080/fckeditor - FCK editor sample
+ Edits the sample node using FCKEditor and browse it JCR browser
+ http://localhost:8080/rest/jcr/repository/production - WebDAV service,
+ Open in Microsoft Explorer, File-Open-OpenAsWebFolder with url http://localhost:8080/rest/jcr/repository/production
+ Add/read/remove files there and browse it in the JCR browser or FTP.
+ User name/password: root/exo
+ ftp://localhost:2121 - FTP server
+ Open the repository in FTP client and browse the JCR repository started with Tomcat as FTP content,
+ add/read/remove files there and browse it in the JCR browser or WebDAV.
+
+EAR deploy
+==========
+
+eXo JCR was tested under JBoss-5.1.0.GA application server
+
+JBoss-5.1.0.GA
+
+ 1. Configuration
+
+ * Copy jcr.ear into $jboss_home/server/default/deploy
+ * Create $jboss_home/server/default/conf/exo-conf folder if it doesn't exist.
+ * Put exo-configuration.xml into $jboss_home/server/default/conf/exo-conf/exo-configuration.xml
+ * Configure JAAS by inserting XML fragment shown below into $jboss_home/server/default/conf/login-config.xml
+
+---------
+<application-policy name="exo-domain">
+ <authentication>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
+ </authentication>
+ </application-policy>
+---------
+
+ 2. Start Up
+
+ Execute
+ * bin/run.bat on Windows
+ or
+ * bin/run.sh on Unix
+
+Resources
+=========
+
+ Company site http://www.exoplatform.com
+ Documentation wiki http://wiki.exoplatform.org
+ Community JIRA https://jira.jboss.org/jira/browse/EXOJCR, http://jira.exoplatform.org
+ Comminity site http://www.exoplatform.org
+ Community forum http://www.exoplatform.com/portal/public/en/forum
+ JavaDoc site http://docs.exoplatform.org
+
\ No newline at end of file
13 years, 2 months
exo-jcr SVN: r3903 - jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-29 05:07:52 -0500 (Sat, 29 Jan 2011)
New Revision: 3903
Modified:
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java
Log:
EXOJCR-1081: temporary exclude some tests
Modified: jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java 2011-01-28 11:18:54 UTC (rev 3902)
+++ jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/backup/AbstractBackupUseCasesTest.java 2011-01-29 10:07:52 UTC (rev 3903)
@@ -427,7 +427,7 @@
fail("There are no backup files in " + backDir.getAbsolutePath());
}
- public void testAutoStopBackupFull() throws Exception
+ public void _testAutoStopBackupFull() throws Exception
{
// backup
File backDir = new File("target/backup/" + workspaceNameToBackup + getUUIndex());
@@ -455,7 +455,7 @@
fail("The backup with id '" + chain.getBackupId() + "' should not be active");
}
- public void testAutoStopBackupIncr() throws Exception
+ public void _testAutoStopBackupIncr() throws Exception
{
// backup
File backDir = new File("target/backup/" + workspaceNameToBackup + getUUIndex());
@@ -491,7 +491,7 @@
backup.stopBackup(bch);
}
- public void testAutoStopBackupIncrRepetion() throws Exception
+ public void _testAutoStopBackupIncrRepetion() throws Exception
{
// backup
File backDir = new File("target/backup/" + workspaceNameToBackup + getUUIndex());
@@ -1102,7 +1102,7 @@
fail("There are no backup files in " + backDir.getAbsolutePath());
}
- public void testAutoStopRepositoryBackupIncrRepetion() throws Exception
+ public void _testAutoStopRepositoryBackupIncrRepetion() throws Exception
{
// backup
File backDir = new File("target/backup/" + getUUIndex());
13 years, 3 months
exo-jcr SVN: r3902 - jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2011-01-28 06:18:54 -0500 (Fri, 28 Jan 2011)
New Revision: 3902
Added:
jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java
jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java
Modified:
jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
Log:
EXOJCR-1174 : Initial implementation.
Modified: jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
===================================================================
--- jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2011-01-28 11:00:17 UTC (rev 3901)
+++ jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2011-01-28 11:18:54 UTC (rev 3902)
@@ -52,7 +52,7 @@
*/
private final Map<Fqn<String>, Indexer> indexers = new HashMap<Fqn<String>, Indexer>();
- private volatile IndexerIoModeHandler modeHandler;
+ protected volatile IndexerIoModeHandler modeHandler;
/**
* @see org.jboss.cache.loader.AbstractCacheLoader#commit(java.lang.Object)
Added: jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java
===================================================================
--- jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java (rev 0)
+++ jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java 2011-01-28 11:18:54 UTC (rev 3902)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.core.query.jbosscache;
+
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoMode;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+
+/**
+ * This cache loader replaces Indexer IO Mode handling with constant ReadWrite state.
+ * This is required for indexing in cluster, when each instance has it's own index stack,
+ * having local FileSystem with LuceneDirectories.
+ *
+ * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: LocalIndexCacheLoader.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
+public class LocalIndexCacheLoader extends IndexerCacheLoader
+{
+ public LocalIndexCacheLoader()
+ {
+ super();
+ modeHandler = new IndexerIoModeHandler(IndexerIoMode.READ_WRITE); // initialize mode handler
+ }
+
+ @Override
+ IndexerIoModeHandler getModeHandler()
+ {
+ return modeHandler;
+ }
+
+ @Override
+ void setMode(IndexerIoMode ioMode)
+ {
+ // can't set RO on this cache loader
+ if (ioMode == IndexerIoMode.READ_ONLY)
+ {
+ throw new UnsupportedOperationException(
+ "Can't set ReadOnly on this type of CacheLoader. It is designed to provide local index for each cluster instance. Make sure you are using Index properly.");
+ }
+ }
+
+}
Property changes on: jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java
===================================================================
--- jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java (rev 0)
+++ jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java 2011-01-28 11:18:54 UTC (rev 3902)
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.core.query.jbosscache;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.services.jcr.config.QueryHandlerEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter;
+import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeHandler;
+import org.exoplatform.services.jcr.impl.core.query.IndexingTree;
+import org.exoplatform.services.jcr.impl.core.query.QueryHandler;
+import org.exoplatform.services.jcr.impl.core.query.SearchManager;
+import org.exoplatform.services.jcr.impl.core.query.lucene.ChangesHolder;
+import org.exoplatform.services.jcr.impl.util.io.PrivilegedCacheHelper;
+import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory;
+import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory.CacheType;
+import org.exoplatform.services.jcr.util.IdGenerator;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheException;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * This type of ChangeFilter offers an ability for each cluster instance to have own
+ * local index (stack of indexes, from persistent to volatile). It uses JBossCache for
+ * Lucene Documents and UUIDs delivery. Each node works in ReadWrite mode, so manages
+ * it own volatile, merger, local list of persisted indexes and stand-alone
+ * UpdateInProgressMonitor implementation.
+ * This implementation is similar to JBossCacheIndexChangesFilter but it doesn't use
+ * SingletonStoreCacheLoader tier and cluster-aware implementations of IndexInfos
+ * and UpdateInProgressMonitor.
+ *
+ * @author <a href="mailto:Sergey.Kabashnyuk@exoplatform.org">Sergey Kabashnyuk</a>
+ * @version $Id: exo-jboss-codetemplates.xml 34360 2009-07-22 23:58:59Z ksm $
+ *
+ */
+public class LocalIndexChangesFilter extends IndexerChangesFilter
+{
+ /**
+ * Logger instance for this class
+ */
+ private final Log log = ExoLogger.getLogger("exo.jcr.component.core.JBossCacheIndexChangesFilter");
+
+ public static final String PARAM_JBOSSCACHE_CONFIGURATION = "jbosscache-configuration";
+
+ public static final String PARAM_JBOSSCACHE_PUSHSTATE = "jbosscache-sscl-push.state.enabled";
+
+ public static final String PARAM_JBOSSCACHE_PUSHSTATE_TIMEOUT = "jbosscache-sscl-push.state.timeout";
+
+ /**
+ * Indicate whether the JBoss Cache instance used can be shared with other caches
+ */
+ public static final String PARAM_JBOSSCACHE_SHAREABLE = "jbosscache-shareable";
+
+ public static final Boolean PARAM_JBOSSCACHE_SHAREABLE_DEFAULT = Boolean.FALSE;
+
+ private final Cache<Serializable, Object> cache;
+
+ private final Fqn<String> rootFqn;
+
+ public static final String LISTWRAPPER = "$lists".intern();
+
+ /**
+ * @param searchManager
+ * @param config
+ * @param indexingTree
+ * @throws RepositoryConfigurationException
+ */
+ public LocalIndexChangesFilter(SearchManager searchManager, SearchManager parentSearchManager,
+ QueryHandlerEntry config, IndexingTree indexingTree, IndexingTree parentIndexingTree, QueryHandler handler,
+ QueryHandler parentHandler, ConfigurationManager cfm) throws IOException, RepositoryException,
+ RepositoryConfigurationException
+ {
+ super(searchManager, parentSearchManager, config, indexingTree, parentIndexingTree, handler, parentHandler, cfm);
+ // create cache using custom factory
+ ExoJBossCacheFactory<Serializable, Object> factory = new ExoJBossCacheFactory<Serializable, Object>(cfm);
+ Cache<Serializable, Object> initCache = factory.createCache(config);
+
+ // initialize IndexerCacheLoader
+ IndexerCacheLoader indexerCacheLoader = new LocalIndexCacheLoader();
+
+ // create CacheLoaderConfig
+ IndividualCacheLoaderConfig individualCacheLoaderConfig = new IndividualCacheLoaderConfig();
+ // set CacheLoader
+ individualCacheLoaderConfig.setCacheLoader(indexerCacheLoader);
+ // set parameters
+ individualCacheLoaderConfig.setFetchPersistentState(false);
+ individualCacheLoaderConfig.setAsync(false);
+ individualCacheLoaderConfig.setIgnoreModifications(false);
+ individualCacheLoaderConfig.setPurgeOnStartup(false);
+ // create CacheLoaderConfig
+ CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
+ cacheLoaderConfig.setShared(false);
+ cacheLoaderConfig.setPassivation(false);
+ cacheLoaderConfig.addIndividualCacheLoaderConfig(individualCacheLoaderConfig);
+ // insert CacheLoaderConfig
+ initCache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);
+ this.rootFqn = Fqn.fromElements(searchManager.getWsId());
+ this.cache =
+ ExoJBossCacheFactory.getUniqueInstance(CacheType.INDEX_CACHE, rootFqn, initCache, config.getParameterBoolean(
+ PARAM_JBOSSCACHE_SHAREABLE, PARAM_JBOSSCACHE_SHAREABLE_DEFAULT));
+
+ PrivilegedCacheHelper.create(cache);
+ PrivilegedCacheHelper.start(cache);
+
+ indexerCacheLoader = (IndexerCacheLoader)((CacheSPI)cache).getCacheLoaderManager().getCacheLoader();
+
+ indexerCacheLoader.register(searchManager, parentSearchManager, handler, parentHandler);
+ IndexerIoModeHandler modeHandler = indexerCacheLoader.getModeHandler();
+ handler.setIndexerIoModeHandler(modeHandler);
+ parentHandler.setIndexerIoModeHandler(modeHandler);
+
+ // using default updateMonitor and default
+ if (!parentHandler.isInitialized())
+ {
+ parentHandler.init();
+ }
+ if (!handler.isInitialized())
+ {
+ handler.init();
+ }
+ }
+
+ /**
+ * @see org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter#doUpdateIndex(java.util.Set, java.util.Set, java.util.Set, java.util.Set)
+ */
+ @Override
+ protected void doUpdateIndex(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes,
+ Set<String> parentAddedNodes)
+ {
+
+ ChangesHolder changes = searchManager.getChanges(removedNodes, addedNodes);
+ ChangesHolder parentChanges = parentSearchManager.getChanges(parentRemovedNodes, parentAddedNodes);
+
+ if (changes == null && parentChanges == null)
+ {
+ return;
+ }
+ String id = IdGenerator.generate();
+ try
+ {
+ PrivilegedCacheHelper.put(cache, Fqn.fromRelativeElements(rootFqn, id), LISTWRAPPER,
+ new ChangesFilterListsWrapper(changes, parentChanges));
+ }
+ catch (CacheException e)
+ {
+ log.error(e.getLocalizedMessage(), e);
+ logErrorChanges(handler, removedNodes, addedNodes);
+ logErrorChanges(parentHandler, parentRemovedNodes, parentAddedNodes);
+ }
+ }
+
+ /**
+ * Log errors
+ * @param logHandler
+ * @param removedNodes
+ * @param addedNodes
+ */
+ private void logErrorChanges(QueryHandler logHandler, Set<String> removedNodes, Set<String> addedNodes)
+ {
+ try
+ {
+ logHandler.logErrorChanges(addedNodes, removedNodes);
+ }
+ catch (IOException ioe)
+ {
+ log.warn("Exception occure when errorLog writed. Error log is not complete. " + ioe, ioe);
+ }
+ }
+}
Property changes on: jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 3 months
exo-jcr SVN: r3901 - in jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules: jcr/concepts and 3 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-28 06:00:17 -0500 (Fri, 28 Jan 2011)
New Revision: 3901
Modified:
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml
Log:
JCR-1582: doc improvements
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,52 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.ClusterConfig">
- <?dbhtml filename="ch-cluster-config.html"?>
-
- <title>Configuring JBoss AS with eXo JCR in cluster</title>
-
+<?dbhtml filename="ch-cluster-config.html"?> <title>Configuring JBoss AS with eXo JCR in cluster</title>
<section>
<title>Launching Cluster</title>
-
<section>
<title>Deploying eXo JCR to JBoss As</title>
-
<para>To deploy eXo JCR to JBoss, do the following steps:</para>
-
<orderedlist>
<listitem>
- <para>Dowload the latest version of eXo JCR ear distribution.</para>
+ <para>Download the latest version of eXo JCR .ear file distribution.</para>
</listitem>
-
<listitem>
<para>Copy <jcr.ear> into
<%jboss_home%/server/default/deploy></para>
</listitem>
-
<listitem>
<para>Put exo-configuration.xml to the root
<%jboss_home%/exo-configuration.xml></para>
</listitem>
-
<listitem>
<para>Configure JAAS by inserting XML fragment shown below into
<%jboss_home%/server/default/conf/login-config.xml></para>
-
- <programlisting><application-policy name="exo-domain">
+ <programlisting><application-policy name="exo-domain">
<authentication>
- <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
+ <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"></login-module>
</authentication>
</application-policy></programlisting>
</listitem>
-
<listitem>
- <para>Ensure that you use JBossTS <link
- linkend="Kernel.TransactionService">Transaction Service</link> and
- JBossCache <link linkend="JCR.JBossTransactionsService">Transaction
- Manager</link>. Your exo-configuration.xml must contain such
+ <para>Ensure that you use JBossTS <link linkend="Kernel.TransactionService">Transaction Service</link> and
+ JBossCache <link linkend="JCR.JBossTransactionsService">Transaction Manager</link>. Your exo-configuration.xml must contain such
parts:</para>
-
<programlisting><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.GenericTransactionManagerLookup</type>^
@@ -63,79 +48,71 @@
</init-params>
</component></programlisting>
</listitem>
-
<listitem>
<para>Start server:</para>
-
<itemizedlist>
<listitem>
<para>bin/run.sh for Unix</para>
</listitem>
-
<listitem>
<para>bin/run.bat for Windows</para>
</listitem>
</itemizedlist>
</listitem>
-
<listitem>
<para>Try accessing <uri>http://localhostu:8080/browser</uri> with
- root/exo as login/password if you have done everything right, you'll
+ root/exo as login/password if you have done everything right, you'll
get access to repository browser.</para>
</listitem>
</orderedlist>
</section>
-
<section id="JCR.ClusterConfig.JCRExternalConfig">
<title>Configuring JCR to use external configuration</title>
-
<itemizedlist>
<listitem>
- <para>To manually configure repository create a new configuration
- file (f.e. exo-jcr-configuration.xml). For details, see <link
- linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
+ <para>To manually configure repository, create a new configuration
+ file (e.g., exo-jcr-configuration.xml). For details, see <link linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
configuration must look like:</para>
-
- <programlisting><repository-service default-repository="repository1">
+ <programlisting><repository-service default-repository="repository1">
<repositories>
- <repository name="repository1" system-workspace="ws1" default-workspace="ws1">
+ <repository name="repository1" system-workspace="ws1" default-workspace="ws1">
<security-domain>exo-domain</security-domain>
<access-control>optional</access-control>
<authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
<workspaces>
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
- <property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="oracle" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="false" />
- <property name="max-buffer-size" value="200k" />
- <property name="swap-directory" value="../temp/swap/production" />
+ <property name="source-name" value="jdbcjcr" />
+ <property name="dialect" value="oracle" />
+ <property name="multi-db" value="false" />
+ <property name="update-storage" value="false" />
+ <property name="max-buffer-size" value="200k" />
+ <property name="swap-directory" value="../temp/swap/production" />
</properties>
<value-storages>
- see "<link linkend="conf_value_storage">Value storage configuration</link>" part.
+ see "<link linkend="conf_value_storage">Value storage configuration</link>" part.
</value-storages>
</container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
<properties>
- <property name="root-nodetype" value="nt:unstructured" />
+ <property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
- see "<link linkend="conf_cache">Cache configuration</link>" part.
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ see "<link linkend="conf_cache">Cache configuration</link>" part.
</cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- see "<link linkend="conf_indexer">Indexer configuration</link>" part.
+ <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ see "<link linkend="conf_indexer">Indexer configuration</link>" part.
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- see "<link linkend="conf_lock_manager">Lock Manager configuration</link>" part.
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ see "<link linkend="conf_lock_manager">Lock Manager configuration</link>" part.
</lock-manager>
</workspace>
- <workspace name="ws2">
+ <workspace name="ws2">
...
</workspace>
- <workspace name="wsN">
+ <workspace name="wsN">
...
</workspace>
</workspaces>
@@ -143,9 +120,8 @@
</repositories>
</repository-service> </programlisting>
</listitem>
-
<listitem>
- <para>and update RepositoryServiceConfiguration configuration in
+ <para>Then, update RepositoryServiceConfiguration configuration in
exo-configuration.xml to use this file:<programlisting><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
@@ -161,105 +137,89 @@
</itemizedlist>
</section>
</section>
-
<section>
<title>Requirements</title>
-
<section>
- <title>Enviorenment requirements</title>
-
+ <title>Environment requirements</title>
<itemizedlist>
<listitem>
<para>Every node of cluster MUST have the same mounted Network File
- System with read and write permissions on it.</para>
-
- <para>"/mnt/tornado" - path to the mounted Network File System (all
- cluster nodes must use the same NFS)</para>
+ System with the read and write permissions on it.</para>
+ <para>"/mnt/tornado" - path to the mounted Network File System (all
+ cluster nodes must use the same NFS).</para>
</listitem>
-
<listitem>
- <para>Every node of cluster MUST use the same database</para>
+ <para>Every node of cluster MUST use the same database.</para>
</listitem>
-
<listitem>
- <para>Same Clusters on different nodes MUST have the same cluster
- names (f.e if Indexer cluster in workspace production on the first
- node has name "production_indexer_cluster", then indexer clusters in
+ <para>The same Clusters on different nodes MUST have the same
+ names (e.g., if Indexer cluster in workspace production on the first
+ node has the name "production_indexer_cluster", then indexer clusters in
workspace production on all other nodes MUST have the same name
- "production_indexer_cluster" )</para>
+ "production_indexer_cluster" ).</para>
</listitem>
</itemizedlist>
</section>
-
<section>
- <title>Enviorenment requirements</title>
-
+ <title>Configuration requirements</title>
<para>Configuration of every workspace in repository must contains of
such parts:</para>
-
<itemizedlist>
<listitem id="conf_value_storage">
<para>Value Storage configuration:</para>
-
<programlisting><value-storages>
- <value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="/mnt/tornado/temp/values/production" /> <!--path within NFS where ValueStorage will hold it's data-->
+ <property name="path" value="/mnt/tornado/temp/values/production" /> <!--path within NFS where ValueStorage will hold it's data-->
</properties>
<filters>
- <filter property-type="Binary" />
+ <filter property-type="Binary" />
</filters>
</value-storage>
</value-storages></programlisting>
</listitem>
-
<listitem id="conf_cache">
<para>Cache configuration:</para>
-
- <programlisting><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ <programlisting><cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-data.xml" /> <!-- path to JBoss Cache configuration for data storage -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name" value="JCR_Cluster_cache_production" /> <!-- JBoss Cache data storage cluster name -->
- <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-data.xml" /> <!-- path to JBoss Cache configuration for data storage -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_cache_production" /> <!-- JBoss Cache data storage cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true" />
</properties>
</cache> </programlisting>
</listitem>
-
<listitem id="conf_indexer">
<para>Indexer configuration:</para>
-
- <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ <programlisting><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
- <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" /> <!-- path within NFS where ValueStorage will hold it's data -->
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache configuration for indexer -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name" value="JCR_Cluster_indexer_production" /> <!-- JBoss Cache indexer cluster name -->
- <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
+ <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" /> <!-- path within NFS where ValueStorage will hold it's data -->
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-indexer.xml" /> <!-- path to JBoss Cache configuration for indexer -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_indexer_production" /> <!-- JBoss Cache indexer cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true" />
</properties>
</query-handler> </programlisting>
</listitem>
-
<listitem id="conf_lock_manager">
<para>Lock Manager configuration:</para>
-
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!-- path to JBoss Cache configuration for lock manager -->
- <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
- <property name="jgroups-multiplexer-stack" value="true" />
- <property name="jbosscache-cluster-name" value="JCR_Cluster_lock_production" /> <!-- JBoss Cache locks cluster name -->
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration" value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!-- path to JBoss Cache configuration for lock manager -->
+ <property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" /> <!-- path to JGroups configuration -->
+ <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-cluster-name" value="JCR_Cluster_lock_production" /> <!-- JBoss Cache locks cluster name -->
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_production"/> <!-- the name of the DB table where lock's data will be stored -->
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true"/>
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false"/>
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_production_pk"/>
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn"/>
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node"/>
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent"/>
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr"/>
+ <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_production"/> <!-- the name of the DB table where lock's data will be stored -->
+ <property name="jbosscache-cl-cache.jdbc.table.create" value="true"/>
+ <property name="jbosscache-cl-cache.jdbc.table.drop" value="false"/>
+ <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_production_pk"/>
+ <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn"/>
+ <property name="jbosscache-cl-cache.jdbc.node.column" value="node"/>
+ <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent"/>
+ <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr"/>
</properties>
</lock-manager></programlisting>
</listitem>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-exo-implementation.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,140 +1,105 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.eXoImplementation">
- <?dbhtml filename="ch-jcr-exo-implementation.html"?>
-
- <title>eXo JCR Implementation</title>
-
+<?dbhtml filename="ch-jcr-exo-implementation.html"?> <title>eXo JCR Implementation</title>
<section>
<title>Related Documents</title>
-
<para>Access Control Configuration, Export Import Implementation, External
Value Storages, JDBC Data Container config, Locking, Multilanguage
support, Node types and Namespaces, Repository and Workspace management,
Repository container life cycle, Workspace, Persistence Storage Workspace,
SimpleDB storage</para>
</section>
-
<section>
<title>How it works</title>
-
<para>eXo Repository Service is a standard eXo service and is a registered
- IoC component, i.e. can be deployed in some eXo Containers (see <link
- linkend="JCR.eXoJCRconfiguration.RepositoryConfiguration">Service
- configuration</link> for details). The relationships between components
+ IoC component, i.e. can be deployed in some eXo Containers (see <link linkend="JCR.eXoJCRconfiguration.RepositoryConfiguration">Service configuration</link> for details). The relationships between components
are shown in the picture below:</para>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/concepts/exojcr.gif" />
+ <imagedata fileref="images/concepts/exojcr.gif"/>
</imageobject>
</mediaobject>
-
<para><keycap>eXo Container: </keycap>some subclasses of
org.exoplatform.container.ExoContainer (usually
org.exoplatform.container.StandaloneContainer or
org.exoplatform.container.PortalContainer) that holds a reference to
Repository Service.</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">Repository Service:</emphasis> contains
information about repositories. eXo JCR is able to manage many
Repositories.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Repository:</emphasis> Implementation of
javax.jcr.Repository. It holds references to one or more
Workspace(s).</para>
</listitem>
-
<listitem>
<para><keycap>Workspace:</keycap> Container of a single rooted tree of
Items. (Note that here it is not exactly the same as
javax.jcr.Workspace as it is not a per Session object).</para>
</listitem>
</itemizedlist>
-
<para>Usual JCR application use case includes two initial steps:</para>
-
<itemizedlist>
<listitem>
- <para>Obtaining Repository object by getting <emphasis
- role="bold">Repository Service</emphasis> from the current eXo
- Container (eXo "native" way) or via JNDI lookup if eXo repository is
- bound to the naming context using (see <link
- linkend="JCR.eXoJCRconfiguration">Service configuration</link> for
+ <para>Obtaining Repository object by getting <emphasis role="bold">Repository Service</emphasis> from the current eXo
+ Container (eXo "native" way) or via JNDI lookup if eXo repository is
+ bound to the naming context using (see <link linkend="JCR.eXoJCRconfiguration">Service configuration</link> for
details).</para>
</listitem>
-
<listitem>
<para>Creating javax.jcr.Session object that calls
Repository.login(..).</para>
</listitem>
-
- <listitem>
- <para>Creating javax.jcr.Session object that calls
- Repository.login(..).</para>
- </listitem>
</itemizedlist>
</section>
-
<section>
<title>Workspace Data Model</title>
-
<para>The following diagram explains which components of eXo JCR
implementation are used in a data flow to perform operations specified in
JCR API</para>
-
<mediaobject>
<imageobject>
- <imagedata fileref="images/concepts/wsdatamodel.gif" />
+ <imagedata fileref="images/concepts/wsdatamodel.gif"/>
</imageobject>
</mediaobject>
-
- <para>The Workspace Data Model can be splitted into 4 levels by data
+ <para>The Workspace Data Model can be split into 4 levels by data
isolation and value from the JCR model point of view.</para>
-
<itemizedlist>
<listitem>
<para>eXo JCR core implements <emphasis role="bold">JCR API</emphasis>
- intefaces such as Item, Node, Property. It contains JCR "logical" view
+ interfaces, such as Item, Node, Property. It contains JCR "logical" view
on stored data.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Session Level</emphasis>: isolates
transient data viewable inside one JCR Session and interacts with API
level using eXo JCR internal API.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Session Data Manager</emphasis>: maintains
transient session data. With data access/ modification/ validation
logic, it contains Modified Items Storage to hold the data changed
between subsequent save() calling and Session Items Cache.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Transaction Data Manager</emphasis>:
maintains session data between save() and transaction commit/ rollback
if the current session is part of a transaction.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Workspace Level</emphasis>: operates for
particular workspace shared data. It contains per-Workspace
objects</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Workspace Storage Data Manager:</emphasis>
maintains workspace data, including final validation, events firing,
caching.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Workspace Data Container</emphasis>:
implements physical data storage. It allows different types of backend
@@ -142,27 +107,22 @@
the main Data Container, other storages for persisted Property Values
can be configured and used.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Indexer:</emphasis> maintains workspace
data indexing for further queries.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Storage Level</emphasis>: Persistent
storages for:</para>
-
<itemizedlist>
<listitem>
<para>JCR Data</para>
</listitem>
-
<listitem>
<para>Indexes (Apache Lucene)</para>
</listitem>
-
<listitem>
- <para>Values (for BLOBs for ex) if different from main Data
+ <para>Values (e.g., for BLOBs) if different from the main Data
Container</para>
</listitem>
</itemizedlist>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/jcr-namespace-altering.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,41 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.Namespacealtering">
- <?dbhtml filename="ch-jcr-namespace-altering.html"?>
-
- <title>Namespace altering</title>
-
- <para>eXo JCR implementation since 1.11 version have support of altering
- namespaces.</para>
-
+<?dbhtml filename="ch-jcr-namespace-altering.html"?> <title>Namespace altering</title>
+ <para>Since version 1.11, eXo JCR implementation supports namespaces altering.</para>
<section>
<title>Adding new namespace</title>
-
<programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
-namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");</programlisting>
+namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");</programlisting>
</section>
-
<section>
<title>Changing existing namespace</title>
-
<programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
-namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
-namespaceRegistry.registerNamespace("newMapping2", "http://dumb.uri/jcr");
-try {
- assertNull(namespaceRegistry.getURI("newMapping"));
- fail("exception should have been thrown");
-} catch (NamespaceException e) {
-}
-assertNotNull(namespaceRegistry.getURI("newMapping2"));
-assertEquals("http://dumb.uri/jcr", namespaceRegistry.getURI("newMapping2"));</programlisting>
+namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
+namespaceRegistry.registerNamespace("newMapping2", "http://dumb.uri/jcr");</programlisting>
</section>
-
<section>
<title>Removing existing namespace</title>
-
<programlisting>ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();
-namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
-namespaceRegistry.unregisterNamespace("newMapping");</programlisting>
+namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
+namespaceRegistry.unregisterNamespace("newMapping");</programlisting>
</section>
</chapter>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/concepts/nodetype-registration.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,33 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.NodeTypeRegistration">
- <?dbhtml filename="ch-nodetype-registration.html"?>
-
- <title>NodeType Registration</title>
-
+<?dbhtml filename="ch-nodetype-registration.html"?> <title>NodeType Registration</title>
<para>eXo JCR implementation supports two ways of Nodetypes
registration:</para>
-
<itemizedlist>
<listitem>
- <para>From a NodeTypeValue POJO and</para>
+ <para>From a NodeTypeValue POJO</para>
</listitem>
-
<listitem>
- <para>From an XML document (stream).</para>
+ <para>From an XML document (stream)</para>
</listitem>
</itemizedlist>
-
<section>
<title>Interfaces and methods</title>
-
<section>
<title>ExtendedNodeTypeManager</title>
-
<para>The ExtendedNodeTypeManager (from JCR 1.11) interface provides the
- following methods related to registering node types</para>
-
+ following methods related to registering node types:</para>
<programlisting>public static final int IGNORE_IF_EXISTS = 0;
public static final int FAIL_IF_EXISTS = 2;
@@ -75,15 +65,12 @@
NoSuchNodeTypeException,
RepositoryException;</programlisting>
</section>
-
<section>
<title>NodeTypeValue</title>
-
<para>The NodeTypeValue interface represents a simple container
structure used to define node types which are then registered through
- the ExtendedNodeTypeManager.registerNodeType method. Implementation of
- this interface doesn't contain any validation logic.</para>
-
+ the ExtendedNodeTypeManager.registerNodeType method. The implementation of
+ this interface does not contain any validation logic.</para>
<programlisting>/**
* @return Returns the declaredSupertypeNames.
*/
@@ -161,15 +148,12 @@
*/
public void setDeclaredPropertyDefinitionValues(List<PropertyDefinitionValue> declaredPropertyDefinitionValues);</programlisting>
</section>
-
<section>
<title>NodeDefinitionValue</title>
-
<para>The NodeDefinitionValue interface extends ItemDefinitionValue with
the addition of writing methods, enabling the characteristics of a child
- node definition to be set, after which the NodeDefinitionValue is added
+ node definition to be set, after that the NodeDefinitionValue is added
to a NodeTypeValue.</para>
-
<programlisting>/**
* @return Returns the declaredSupertypeNames.
*/
@@ -249,15 +233,12 @@
</programlisting>
</section>
-
<section>
<title>PropertyDefinitionValue</title>
-
<para>The PropertyDefinitionValue interface extends ItemDefinitionValue
with the addition of writing methods, enabling the characteristics of a
- child property definition to be set, after which the
+ child property definition to be set, after that the
PropertyDefinitionValue is added to a NodeTypeValue.</para>
-
<programlisting>/**
* @return Returns the defaultValues.
*/
@@ -298,10 +279,8 @@
*/
public void setValueConstraints(List<String> valueConstraints);</programlisting>
</section>
-
<section>
<title>ItemDefinitionValue</title>
-
<programlisting> /**
* @return Returns the autoCreate.
*/
@@ -353,36 +332,30 @@
public void setReadOnly(boolean readOnly);</programlisting>
</section>
</section>
-
<section>
<title>Node type registration</title>
-
<para>eXo JCR implementation supports various methods of the node-type
registration.</para>
-
<section>
<title>Run time registration from xml file.</title>
-
<programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
-InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
+InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
nodeTypeManager.registerNodeTypes(is,ExtendedNodeTypeManager.IGNORE_IF_EXISTS );</programlisting>
</section>
-
<section>
<title>Run time registration using NodeTypeValue.</title>
-
<programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
NodeTypeValue testNValue = new NodeTypeValue();
List<String> superType = new ArrayList<String>();
-superType.add("nt:base");
-testNValue.setName("exo:myNodeType");
-testNValue.setPrimaryItemName("");
+superType.add("nt:base");
+testNValue.setName("exo:myNodeType");
+testNValue.setPrimaryItemName("");
testNValue.setDeclaredSupertypeNames(superType);
List<PropertyDefinitionValue> props = new ArrayList<PropertyDefinitionValue>();
-props.add(new PropertyDefinitionValue("*",
+props.add(new PropertyDefinitionValue("*",
false,
false,
1,
@@ -396,42 +369,33 @@
nodeTypeManager.registerNodeType(testNValue, ExtendedNodeTypeManager.FAIL_IF_EXISTS);</programlisting>
</section>
</section>
-
<section>
<title>Changing existing node type</title>
-
<para>If you want to replace existing node type definition, you should
pass ExtendedNodeTypeManager.REPLACE_IF_EXISTS as a second parameter for
the method ExtendedNodeTypeManager.registerNodeType.</para>
-
<programlisting>ExtendedNodeTypeManager nodeTypeManager = (ExtendedNodeTypeManager) session.getWorkspace()
.getNodeTypeManager();
-InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
+InputStream is = MyClass.class.getResourceAsStream("mynodetypes.xml");
.....
nodeTypeManager.registerNodeTypes(is,ExtendedNodeTypeManager.REPLACE_IF_EXISTS );</programlisting>
</section>
-
<section>
<title>Removing node type</title>
-
<note>
- <para>: Node type is only possibly removed when repository doesn't
- contains this node type.</para>
+ <para>Node type is only possibly removed when the repository does not
+ contain this node type.</para>
</note>
-
- <programlisting>nodeTypeManager.unregisterNodeType("myNodeType");</programlisting>
+ <programlisting>nodeTypeManager.unregisterNodeType("myNodeType");</programlisting>
</section>
-
<section>
<title>Practical How to</title>
-
<section>
<title>Adding new PropertyDefinition</title>
-
<programlisting>
NodeTypeValue myNodeTypeValue = nodeTypeManager.getNodeTypeValue(myNodeTypeName);
List<PropertyDefinitionValue> props = new ArrayList<PropertyDefinitionValue>();
-props.add(new PropertyDefinitionValue("tt",
+props.add(new PropertyDefinitionValue("tt",
true,
true,
1,
@@ -444,87 +408,69 @@
nodeTypeManager.registerNodeType(myNodeTypeValue, ExtendedNodeTypeManager.REPLACE_IF_EXISTS);</programlisting>
</section>
-
<section>
<title>Adding new child NodeDefinition</title>
-
<programlisting>NodeTypeValue myNodeTypeValue = nodeTypeManager.getNodeTypeValue(myNodeTypeName);
List<NodeDefinitionValue> nodes = new ArrayList<NodeDefinitionValue>();
-nodes.add(new NodeDefinitionValue("child",
+nodes.add(new NodeDefinitionValue("child",
false,
false,
1,
false,
- "nt:base",
+ "nt:base",
new ArrayList<String>(),
false));
testNValue.setDeclaredChildNodeDefinitionValues(nodes);
nodeTypeManager.registerNodeType(myNodeTypeValue, ExtendedNodeTypeManager.REPLACE_IF_EXISTS);</programlisting>
</section>
-
<section>
- <title>Changing or removing existing PropertyDefinition or child
- NodeDefinition</title>
-
- <para>Note to <emphasis role="bold">consistency of the existing
- data</emphasis> before changing or removing existing definition . JCR
+ <title>Changing or removing existing PropertyDefinition or child NodeDefinition</title>
+ <para>Note that the existing data must be consistent before changing or removing a existing definition . JCR
<emphasis role="bold">does not allow</emphasis> you to change the node
- type in the way in which the the existing data would be incompatible
- with new node type. But if these changes are needed, you can do it in
+ type in the way in which the existing data would be incompatible
+ with a new node type. But if these changes are needed, you can do it in
several phases, consistently changing the node type and the existing
data.</para>
-
<para>For example:</para>
-
- <para>Add new residual property definition with name "downloadCount" to
- the existing node type "myNodeType".</para>
-
- <para>There are two limitations that do not allow us to made the task
- with single call of registerNodeType method.</para>
-
+ <para>Add a new residual property definition with name "downloadCount" to
+ the existing node type "myNodeType".</para>
+ <para>There are two limitations that do not allow us to make the task
+ with a single call of registerNodeType method.</para>
<itemizedlist>
<listitem>
- <para>Existing nodes of the type "myNodeType", which does not
- contain properties "downloadCount" that conflicts with node type
+ <para>Existing nodes of the type "myNodeType", which does not
+ contain properties "downloadCount" that conflicts with node type
what we need.</para>
</listitem>
-
<listitem>
- <para>Registered node type "myNodeType" will not allow us to add
- properties "downloadCount" because it has no such specific
+ <para>Registered node type "myNodeType" will not allow us to add
+ properties "downloadCount" because it has no such specific
properties.</para>
</listitem>
</itemizedlist>
-
<para>To complete the task, we need to make 3 steps:</para>
-
<itemizedlist>
<listitem>
- <para>Changing the existing node type "myNodeType" by adding not
- mandatory property "downloadCount".</para>
+ <para>Change the existing node type "myNodeType" by adding the
+ mandatory property "downloadCount".</para>
</listitem>
-
<listitem>
- <para>Adding to all existing nodes of the node type "myNodeType"
- property "downloadCount".</para>
+ <para>Add the node type "myNodeType" with the property "downloadCount" to all the existing node types.</para>
</listitem>
-
<listitem>
- <para>Changing definition of the property "downloadCount" of the
- node type "myNodeType" to mandatory.</para>
+ <para>Change the definition of the property "downloadCount" of the
+ node type "myNodeType" to mandatory.</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>Changing the list of super types</title>
+ <programlisting>NodeTypeValue testNValue = nodeTypeManager.getNodeTypeValue("exo:myNodeType");
- <programlisting>NodeTypeValue testNValue = nodeTypeManager.getNodeTypeValue("exo:myNodeType");
-
List<String> superType = testNValue.getDeclaredSupertypeNames();
-superType.add("mix:versionable");
+superType.add("mix:versionable");
testNValue.setDeclaredSupertypeNames(superType);
nodeTypeManager.registerNodeType(testNValue, ExtendedNodeTypeManager.REPLACE_IF_EXISTS);</programlisting>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/lock-manager-config.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,183 +1,143 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.LockManagerConfiguration">
- <?dbhtml filename="ch-lock-manager-config.html"?>
-
- <title>LockManager configuration</title>
-
+<?dbhtml filename="ch-lock-manager-config.html"?> <title>LockManager configuration</title>
<section>
<title>Introduction</title>
-
<para>What LockManager does?</para>
-
- <para>In general, LockManager stores lock objects, so it can give Lock
+ <para>In general, LockManager stores Lock objects, so it can give a Lock
object or can release it, etc.</para>
-
<para>Also, LockManager is responsible for removing Locks that live too
- long. This parameter may be configured with "time-out" property.</para>
-
- <para>JCR provide two base implementation of LockManager:</para>
-
+ long. This parameter may be configured with "time-out" property.</para>
+ <para>JCR provides two basic implementations of LockManager:</para>
<itemizedlist>
<listitem>
<para><classname>org.exoplatform.services.jcr.impl.core.lock.LockManagerImpl</classname>;</para>
</listitem>
-
<listitem>
<para><classname>org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl</classname>;</para>
</listitem>
</itemizedlist>
-
- <para>In this article, we will talk mostly about
+ <para>In this article, we will mostly mention about
CacheableLockManagerImpl.</para>
-
<para>You can enable LockManager by adding lock-manager-configuration to
workspace-configuration.</para>
-
<para>For example:</para>
-
- <programlisting><workspace name="ws">
+ <programlisting><workspace name="ws">
...
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
+ <property name="time-out" value="15m" />
...
</properties>
</lock-manager>
...
</workspace></programlisting>
</section>
-
<section>
<title>LockManagerImpl</title>
-
- <para>LockManagerImpl is simple implementation of LockManager, and also
+ <para>LockManagerImpl is a 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
does not support replication in any way.</para>
-
- <para>See more about LockManager Configuration at <link
- linkend="JCR.eXoJCRconfiguration">here</link>.</para>
+ <para>See more about LockManager Configuration at <link linkend="JCR.eXoJCRconfiguration">here</link>.</para>
</section>
-
<section>
<title>CacheableLockManagerImpl</title>
-
- <para>CacheableLockManagerImpl stores Lock object in JBoss-cache, so Locks
- are replicable and affects on cluster, not only a single node. Also
- JBoss-cache has JDBCCacheLoader, so locks will be stored to
+ <para>CacheableLockManagerImpl stores Lock objects in JBoss-cache, so Locks
+ are replicable and affect on cluster, not only a single node. Also,
+ JBoss-cache has JDBCCacheLoader, so Locks will be stored to the
database.</para>
-
- <para>Both implementation supports Expired Locks removing. There is
- LockRemover - separate thread, that periodically ask LockManager for Locks
- that live much and must be removed. So, timeout for LockRemover may be set
- as follows, default value is 30m.</para>
-
+ <para>Both of the implementations support to remove Expired Locks. LockRemover separates threads, that periodically ask LockManager to remove Locks
+ that live so long. So, the timeout for LockRemover may be set
+ as follows, the default value is 30m.</para>
<programlisting><properties>
- <property name="time-out" value="10m" />
+ <property name="time-out" value="10m" />
...
</properties></programlisting>
-
<section>
<title>Configuration</title>
-
- <para>Replication requirements are the same for Cache</para>
-
- <para> You can see a full JCR configuration example at <link
- linkend="JCR.ClusterConfig.JCRExternalConfig">here</link>.</para>
-
+ <para>Replication requirements are the same for Cache.</para>
+ <para> You can see a full JCR configuration example at <link linkend="JCR.ClusterConfig.JCRExternalConfig">here</link>.</para>
<para>Common tips:</para>
-
<itemizedlist>
<listitem>
- <para><parameter>clusterName</parameter> ("jbosscache-cluster-name")
+ <para><parameter>clusterName</parameter> ("jbosscache-cluster-name")
must be unique;</para>
</listitem>
-
<listitem>
<para><parameter>cache.jdbc.table.name</parameter> must be unique
per datasource;</para>
</listitem>
-
<listitem>
- <para><parameter>cache.jdbc.fqn.type</parameter> must and
+ <para><parameter>cache.jdbc.fqn.type</parameter> and
cache.jdbc.node.type must be configured according to used
database;</para>
</listitem>
</itemizedlist>
-
- <para>There is a few ways to configure CacheableLockManagerImpl, and all
+ <para>There are a few ways to configure CacheableLockManagerImpl, and all
of them configure JBoss-cache and JDBCCacheLoader.</para>
-
- <para>See <ulink
- url="http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader">http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader</ulink></para>
+ <para>See <ulink url="http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader">http://community.jboss.org/wiki/JBossCacheJDBCCacheLoader</ulink></para>
</section>
-
<section>
- <title>Simple JbossCache Configuraion</title>
-
- <para>First one is - put JbossCache configuraion file path to
- CacheableLockManagerImpl</para>
-
+ <title>Simple JbossCache Configuration</title>
+ <para>The first one is putting JbossCache configuraion file path to
+ CacheableLockManagerImpl.</para>
<para><note>
- <para>This configuration is not so good as you can think. Because
- repository may contain many workspaces, and each workspace must
- contain LockManager configuration, and LockManager config may
- contain JbossCache config file. So total configuration is growing
- up. But it is usefull if we want a single LockManager with special
+ <para>This configuration is not so good as you think. Because
+ the repository may contain many workspaces, and each workspace must
+ contain LockManager configuration, and LockManager configuration may
+ contain the JbossCache config file. So, the total configuration will grow
+ up. But it is useful if we want to have a single LockManager with a special
configuration.</para>
</note></para>
-
- <para>Config is:</para>
-
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <para>Configuration is as follows:</para>
+ <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="conf/standalone/cluster/test-jbosscache-lock-config.xml" />
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration" value="conf/standalone/cluster/test-jbosscache-lock-config.xml" />
</properties>
</lock-manager></programlisting>
+ <para><filename>test-jbosscache-lock-config.xml</filename><programlisting><?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
- <para><filename>test-jbosscache-lock-config.xml</filename><programlisting><?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
-
- <clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_Name">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true" />
+ <clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_Name">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true" />
<jgroupsConfig>
- <TCP bind_addr="127.0.0.1" start_port="9800" loopback="true" recv_buf_size="20000000" send_buf_size="640000" discard_incompatible_packets="true"
- max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
- skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
- thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
- oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
- <MPING timeout="2000" num_initial_members="2" mcast_port="34540" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+ <TCP bind_addr="127.0.0.1" start_port="9800" loopback="true" recv_buf_size="20000000" send_buf_size="640000" discard_incompatible_packets="true"
+ max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="false" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="2" mcast_port="34540" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
- <MERGE2 max_interval="30000" min_interval="10000" />
+ <MERGE2 max_interval="30000" min_interval="10000" />
<FD_SOCK />
- <FD max_tries="5" shun="true" timeout="10000" />
- <VERIFY_SUSPECT timeout="1500" />
- <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
- <UNICAST timeout="300,600,1200,2400,3600" />
- <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000" />
- <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
- <FRAG2 frag_size="60000" />
+ <FD max_tries="5" shun="true" timeout="10000" />
+ <VERIFY_SUSPECT timeout="1500" />
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false" />
+ <UNICAST timeout="300,600,1200,2400,3600" />
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000" />
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true" />
+ <FRAG2 frag_size="60000" />
<pbcast.STREAMING_STATE_TRANSFER />
- <pbcast.FLUSH timeout="0" />
+ <pbcast.FLUSH timeout="0" />
</jgroupsConfig
<sync />
</clustering>
- <loaders passivation="false" shared="true">
+ <loaders passivation="false" shared="true">
<preload>
- <node fqn="/" />
+ <node fqn="/" />
</preload>
- <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
<properties>
cache.jdbc.table.name=jcrlocks_ws
cache.jdbc.table.create=true
@@ -195,63 +155,53 @@
</loaders>
</jbosscache></programlisting></para>
-
<para>Configuration requirements:</para>
-
<itemizedlist>
<listitem>
- <para><clustering mode="replication"
- clusterName="JBoss-Cache-Lock-Cluster_Name"> - cluster name must
+ <para><clustering mode="replication"
+ clusterName="JBoss-Cache-Lock-Cluster_Name"> - the cluster name must
be unique;</para>
</listitem>
-
<listitem>
<para><parameter>cache.jdbc.table.name</parameter> must be unique
per datasource;</para>
</listitem>
-
<listitem>
<para><parameter>cache.jdbc.node.type</parameter> and
<parameter>cache.jdbc.fqn.type</parameter> must be configured
- according to using database. See <link endterm="datatypes.title"
- linkend="datatypes"></link> .</para>
+ according to using the database. See <link endterm="datatypes.title" linkend="datatypes"/> .</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>Template JBossCache Configuration</title>
-
- <para>Second one is using template JBoss-cache configuration for all
- LockManagers</para>
-
+ <para>The second one is using the template JBoss-cache configuration for all
+ LockManagers.</para>
<para><citetitle>Lock template configuration</citetitle></para>
-
<para><filename>test-jbosscache-lock.xml</filename></para>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000" />
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
- lockAcquisitionTimeout="20000" />
-
- <clustering mode="replication" clusterName="${jbosscache-cluster-name}">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <jgroupsConfig multiplexerStack="jcr.stack" />
+ <clustering mode="replication" clusterName="${jbosscache-cluster-name}">
+ <stateRetrieval timeout="20000" fetchInMemoryState="false" />
+ <jgroupsConfig multiplexerStack="jcr.stack" />
<sync />
</clustering>
- <loaders passivation="false" shared="true">
+ <loaders passivation="false" shared="true">
<!-- All the data of the JCR locks needs to be loaded at startup -->
<preload>
- <node fqn="/" />
+ <node fqn="/" />
</preload>
<!--
For another cache-loader class you should use another template with
cache-loader specific parameters
->
- <loader class="org.jboss.cache.loader.JDBCCacheLoader" async=q"false" fetchPersistentState="false"
- ignoreModifications="false" purgeOnStartup="false">
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader" async=q"false" fetchPersistentState="false"
+ ignoreModifications="false" purgeOnStartup="false">
<properties>
cache.jdbc.table.name=${jbosscache-cl-cache.jdbc.table.name}
cache.jdbc.table.create=${jbosscache-cl-cache.jdbc.table.create}
@@ -267,76 +217,70 @@
</loader>
</loaders>
</jbosscache></programlisting>
-
- <para>As you see, all configurable paramaters are filled by templates
- and will be replaced by LockManagers conf parameters:</para>
-
- <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ <para>As you see, all configurable parameters are filled by templates
+ and will be replaced by LockManagers configuration parameters:</para>
+ <programlisting><lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="test-jbosscache-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="jgroups-multiplexer-stack" value="true" />
- <property name="jbosscache-cluster-name" value="JCR-cluster-locks-ws" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_ws" />
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_ws_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="AUTO"/>
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="AUTO"/>
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration" value="test-jbosscache-lock.xml" />
+ <property name="jgroups-configuration" value="udp-mux.xml" />
+ <property name="jgroups-multiplexer-stack" value="true" />
+ <property name="jbosscache-cluster-name" value="JCR-cluster-locks-ws" />
+ <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_ws" />
+ <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
+ <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
+ <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_ws_pk" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
+ <property name="jbosscache-cl-cache.jdbc.fqn.type" value="AUTO"/>
+ <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
+ <property name="jbosscache-cl-cache.jdbc.node.type" value="AUTO"/>
+ <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
+ <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
</lock-manager></programlisting>
-
<para>Configuration requirements:<itemizedlist>
<listitem>
<para><parameter>jbosscache-cl-cache.jdbc.fqn.column</parameter>
and <parameter>jbosscache-cl-cache.jdbc.node.type</parameter> is
- nothing else as cache.jdbc.fqn.type and cache.jdbc.node.type in
+ the same as cache.jdbc.fqn.type and cache.jdbc.node.type in
JBoss-Cache configuration. You can set those data types according
- to database type (See <link endterm="datatypes.title"
- linkend="datatypes"></link>) or set it as AUTO (or do not set at
- all) and data type will by detected automaticaly.</para>
+ to database type (See <link endterm="datatypes.title" linkend="datatypes"/>) or set it as AUTO (or do not set at
+ all) and data type will be detected automatically.</para>
</listitem>
-
<listitem>
- <para>As you see, jgroups-configuration moved to separate config
- file - udp-mux.xml; In our case udp-mux.xml is common JGroup
- config for all components (QueryHandler, cache, LockManager). But
- we can still create own config.</para>
+ <para>As you see, jgroups-configuration is moved to separate the configuration
+ file - udp-mux.xml. In this case, the udp-mux.xml file is a common JGroup
+ configuration for all components (QueryHandler, Cache, LockManager), but
+ we can still create our own configuration.</para>
</listitem>
</itemizedlist></para>
-
<para><filename>our-udp-mux.xml</filename><programlisting><protocol_stacks>
- <stack name="jcr.stack">
+ <stack name="jcr.stack">
<config>
- <UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
- discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
- use_incoming_packet_handler="true" ip_ttl="2" enable_bundling="true" enable_diagnostics="true"
- thread_naming_pattern="cl" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="2"
- thread_pool.max_threads="8" thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="1000" thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="Run" />
+ <UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
+ discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
+ use_incoming_packet_handler="true" ip_ttl="2" enable_bundling="true" enable_diagnostics="true"
+ thread_naming_pattern="cl" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="2"
+ thread_pool.max_threads="8" thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000" thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="Run" />
- <PING timeout="2000" num_initial_members="3" />
- <MERGE2 max_interval="30000" min_interval="10000" />
+ <PING timeout="2000" num_initial_members="3" />
+ <MERGE2 max_interval="30000" min_interval="10000" />
<FD_SOCK />
- <FD timeout="10000" max_tries="5" shun="true" />
- <VERIFY_SUSPECT timeout="1500" />
+ <FD timeout="10000" max_tries="5" shun="true" />
+ <VERIFY_SUSPECT timeout="1500" />
<BARRIER />
- <pbcast.NAKACK use_stats_for_retransmission="false" exponential_backoff="150" use_mcast_xmit="true"
- gc_lag="0" retransmit_timeout="50,300,600,1200" discard_delivered_msgs="true" />
- <UNICAST timeout="300,600,1200" />
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="1000000" />
- <VIEW_SYNC avg_send_interval="60000" />
- <pbcast.GMS print_local_addr="true" join_timeout="3000" shun="false" view_bundling="true" />
- <FC max_credits="500000" min_threshold="0.20" />
- <FRAG2 frag_size="60000" />
+ <pbcast.NAKACK use_stats_for_retransmission="false" exponential_backoff="150" use_mcast_xmit="true"
+ gc_lag="0" retransmit_timeout="50,300,600,1200" discard_delivered_msgs="true" />
+ <UNICAST timeout="300,600,1200" />
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="1000000" />
+ <VIEW_SYNC avg_send_interval="60000" />
+ <pbcast.GMS print_local_addr="true" join_timeout="3000" shun="false" view_bundling="true" />
+ <FC max_credits="500000" min_threshold="0.20" />
+ <FRAG2 frag_size="60000" />
<!--pbcast.STREAMING_STATE_TRANSFER /-->
<pbcast.STATE_TRANSFER />
<!-- pbcast.FLUSH /-->
@@ -344,94 +288,62 @@
</stack>
</protocol_stacks> </programlisting></para>
</section>
-
<section id="datatypes">
<title id="datatypes.title">Data Types in Different Databases</title>
-
<table>
- <title>Fqn type and node type in different databases</title>
-
+ <title>FQN type and node type in different databases</title>
<tgroup cols="3">
<thead>
<row>
<entry>DataBase name</entry>
-
<entry>Node data type</entry>
-
<entry>FQN data type</entry>
</row>
</thead>
-
<tbody>
<row>
<entry>default</entry>
-
<entry>BLOB</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>HSSQL</entry>
-
<entry>OBJECT</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>MySQL</entry>
-
<entry>LONGBLOB</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>ORACLE</entry>
-
<entry>BLOB</entry>
-
<entry>VARCHAR2(512)</entry>
</row>
-
<row>
<entry>PostgreSQL</entry>
-
<entry>bytea</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>MSSQL</entry>
-
<entry>VARBINARY(MAX)</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>DB2</entry>
-
<entry>BLOB</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>Sybase</entry>
-
<entry>IMAGE</entry>
-
<entry>VARCHAR(512)</entry>
</row>
-
<row>
<entry>Ingres</entry>
-
<entry>long byte</entry>
-
<entry>VARCHAR(512)</entry>
</row>
</tbody>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,122 +1,92 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="JCR.AccessControl">
- <?dbhtml filename="ch-acl.html"?>
-
- <title>Access Control</title>
-
- <para>eXo JCR is a complete implementation of the standard JSR 170: <ulink
- url="http://jcp.org/en/jsr/detail?id=170">Content Repository for Java TM
- Technology API</ulink>, including <emphasis role="bold">Level 1, Level 2 and
- Additional Features</emphasis> specified in the JCR Specification.</para>
-
+<?dbhtml filename="ch-acl.html"?> <title>Access Control</title>
+ <para>eXo JCR is a complete implementation of the standard JSR 170: <ulink url="http://jcp.org/en/jsr/detail?id=170">Content Repository for Java TM Technology API</ulink>, including <emphasis role="bold">Level 1, Level 2 and Additional Features</emphasis> specified in the JCR Specification.</para>
<section>
<title>Standard Action Permissions</title>
-
<para>The JCR specification (JSR 170) does not have many requirements
about Access Control. It only requires the implementation of the
Session.checkPermission(String absPath, String actions) method. This
method checks if a current session has permissions to perform some actions
on absPath:</para>
-
<itemizedlist>
<listitem>
<para>absPath : The string representation of a JCR absolute
- path</para>
+ path.</para>
</listitem>
-
<listitem>
<para>actions : eXo JCR interprets this string as a comma separated
- the list of individual action names such as the 4 types defined in JSR
+ the list of individual action names, such as the 4 types defined in JSR
170 :</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">add_node</emphasis> : Permission to
- add a node</para>
+ add a node.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">set_property</emphasis> : Permission
- to set a property</para>
+ to set a property.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">remove</emphasis> : Permission to
- remove an item (node or property)</para>
+ remove an item (node or property).</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">read</emphasis> : Permission to
- retrieve a node or read a property value</para>
+ retrieve a node or read a property value.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
-
<para>For example :</para>
-
<itemizedlist>
<listitem>
- <para>session.checkPermission("/Groups/organization",
- "add_node,set_property") will check if the session is allowed to add a
- child node to "organization" and to modify its properties. If one of
+ <para>session.checkPermission("/Groups/organization",
+ "add_node,set_property") will check if the session is allowed to add a
+ child node to "organization" and to modify its properties. If one of
the two permissions is denied, an AccessDeniedException is
thrown.</para>
</listitem>
-
<listitem>
- <para>session.checkPermission("/Groups/organization/exo:name",
- "read,set_property") will check if the session is allowed to read and
- change the "exo:name" property of the "organization" node.</para>
+ <para>session.checkPermission("/Groups/organization/exo:name",
+ "read,set_property") will check if the session is allowed to read and
+ change the "exo:name" property of the "organization" node.</para>
</listitem>
-
<listitem>
- <para>session.checkPermission("/Groups/organization/exo:name",
- "remove") will check if the session allowed to remove "exo:name"
+ <para>session.checkPermission("/Groups/organization/exo:name",
+ "remove") will check if the session allowed to remove "exo:name"
property or node.</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>eXo Access Control</title>
-
<para>The JSR170 specification does not define how permissions are managed
or checked. So eXo JCR has implemented its own proprietary extension to
manage and check permissions on nodes. In essence, this extension uses an
- <ulink url="http://en.wikipedia.org/wiki/Access_control_list">Access
- Control List (ACL)</ulink> policy model applied to eXo Organization model
+ <ulink url="http://en.wikipedia.org/wiki/Access_control_list">Access Control List (ACL)</ulink> policy model applied to eXo Organization model
(see eXo Platform Organization Service).</para>
-
<section>
<title>Principal and Identity</title>
-
- <para>At the heart of eXo Access Control, is the notion of the <emphasis
- role="bold">identity</emphasis> concept. Access to JCR is made through
+ <para>At the heart of eXo Access Control, is the notion of the <emphasis role="bold">identity</emphasis> concept. Access to JCR is made through
sessions acquired against a repository. Sessions can be authenticated
through the standard (but optional) repository login mechanism. Each
session is associated with a <emphasis role="bold">principal</emphasis>.
The principal is an authenticated user or group that may act on JCR
- data. The identity is a string identifying this <emphasis
- role="bold">group or user</emphasis>.'</para>
-
+ data. The identity is a string identifying this <emphasis role="bold">group or user</emphasis>.'</para>
<para>There are 3 reserved identities that have special meanings in eXo
JCR:</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">any</emphasis> : represents any
authenticated session.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">anonim</emphasis> : represents a
- principal for non authenticated sessions. (No error, it's really
- "\_\_anonim".)</para>
+ principal for non authenticated sessions. (No error, it's really
+ "\_\_anonim".)</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">system</emphasis> : represents a
principal for system sessions, typically used for administrative
@@ -126,18 +96,14 @@
</listitem>
</itemizedlist>
</section>
-
<section>
<title>ACL</title>
-
<para>An access control list (ACL) is a list of permissions attached to
an object. An ACL specifies which users, groups or system processes are
granted access to JCR nodes, as well as what operations are allowed to
be performed on given objects.</para>
-
<para>eXo JCR Access Control is based on two facets applied to nodes
:</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">Privilegeable</emphasis> : Means that
@@ -145,7 +111,6 @@
privileges to access to this node. The privileges are defined as
(positive) permissions that are granted to users or groups.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">Ownable</emphasis> : The node has an
<emphasis role="bold">owner</emphasis>. The owner has always
@@ -153,119 +118,93 @@
the node, independent of the privilegeable facet.</para>
</listitem>
</itemizedlist>
-
<section>
<title>Privilegeable</title>
-
<para>A privilegeable node defines the permissions required for
actions on this node. For this purpose, it contains an ACL.</para>
-
- <para>At JCR level, this is implemented by an <emphasis
- role="bold">exo:privilegeable</emphasis> mixin.</para>
-
- <programlisting><nodeType name="exo:privilegeable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <para>At JCR level, this is implemented by an <emphasis role="bold">exo:privilegeable</emphasis> mixin.</para>
+ <programlisting><nodeType name="exo:privilegeable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
- <propertyDefinition name="exo:permissions" requiredType="Permission" autoCreated="true" mandatory="true"
- onParentVersion="COPY" protected="true" multiple="true">
+ <propertyDefinition name="exo:permissions" requiredType="Permission" autoCreated="true" mandatory="true"
+ onParentVersion="COPY" protected="true" multiple="true">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
</nodeType></programlisting>
-
<para>A privilegeable node can have multiple exo:permissions values.
- The type of these values is the eXo JCR specific type Permission. The
+ The type of these values is the eXo JCR specific Permission type. The
Permission type contains a list of ACL.</para>
-
<para>The possible values are corresponding to JCR standard
actions:</para>
-
<itemizedlist>
<listitem>
<para><emphasis role="bold">read</emphasis>: The node or its
properties can be read.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">remove</emphasis>: The node or its
properties can be removed.</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">add_node</emphasis> : Child nodes can
be added to this node.</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">set_property</emphasis> : The node's
+ <para><emphasis role="bold">set_property</emphasis> : The node's
properties can be modified, added or removed.</para>
</listitem>
</itemizedlist>
</section>
-
<section>
<title>Ownable</title>
-
- <para>An ownable node defines an owner identity. The <emphasis
- role="bold">owner</emphasis> has always <emphasis role="bold">full
- privileges</emphasis>. These privileges are independent of the
+ <para>An ownable node defines an owner identity. The <emphasis role="bold">owner</emphasis> has always <emphasis role="bold">full privileges</emphasis>. These privileges are independent of the
permissions set by exo:permissions. At JCR level, the ownership is
implemented by an <emphasis role="bold">exo:owneable</emphasis> mixin.
This mixin holds an owner property.</para>
-
- <programlisting><nodeType name="exo:owneable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <programlisting><nodeType name="exo:owneable" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
- <propertyDefinition name="exo:owner" requiredType="String" autoCreated="true" mandatory="true" onParentVersion="COPY"
- protected="true" multiple="false">
+ <propertyDefinition name="exo:owner" requiredType="String" autoCreated="true" mandatory="true" onParentVersion="COPY"
+ protected="true" multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
</nodeType></programlisting>
-
<para>The exo:owner property value contains exactly one identity
string value. There might be a long list of different permissions for
different identities (user or groups). All permissions are always
positive permissions; denials are not possible. When checking a
- permission of an action, it's therefore perfectly sufficient that the
- principal of a session belongs to one the groups, to whom the
+ permission of an action, it's therefore perfectly sufficient that the
+ principal of a session belongs to the groups to which the
concerned action is granted.</para>
</section>
-
<section>
<title>ACL Inheritance</title>
-
- <para>In order to grant or deny access to a node, eXo JCR applies a
+ <para>To grant or deny access to a node, eXo JCR applies a
privilege resolving logic at node access time.</para>
-
<para>If a node is <emphasis role="bold">privilegeable</emphasis>, the
- node's ACL is used exclusively. If the ACL does not match the
- principal's identity, the principal has no access (except the owner of
+ node's ACL is used exclusively. If the ACL does not match the
+ principal's identity, the principal has no access (except the owner of
the node).</para>
-
<para>Non-privilegeable nodes inherit permissions from their parent
- node. If the parent node isn't privilegeable either, the resolving
+ node. If the parent node is not privilegeable either, the resolving
logic looks further up the node hierarchy and stops with the first
privilegeable ancestor of the current node. All nodes potentially
inherit from the <emphasis role="bold">workspace</emphasis> root
node.</para>
-
<para>The owner of a node is inherited in accordance with the same
logic: If the node has no owner, the owner information of the closest
owneable ancestor is inherited.</para>
-
- <para>This inheritance is implemented by browsing up the node's
+ <para>This inheritance is implemented by browsing up the node's
hierarchy. At access time, if the node does not have owner or
- permissions, the system looks up into the node's ancestor hierarchy
+ permissions, the system looks up into the node's ancestor hierarchy
for the <emphasis role="bold">first</emphasis> ACL.</para>
</section>
-
<section>
<title>Default ACL of the root node</title>
-
<para>When no matching ACL is found in the ancestor hierarchy, the
- system may end up looking at the root node's ACL. As ACL are optional,
+ system may end up looking at the root node's ACL. As ACL are optional,
even for the root node, if the root node has no ACL, the following
- rule is ultimately applied to resolve privileges :</para>
-
+ rule is ultimately applied to resolve privileges:</para>
<itemizedlist>
<listitem>
<para><emphasis role="bold">any</emphasis> identity (any
@@ -274,293 +213,200 @@
</itemizedlist>
</section>
</section>
-
<section>
<title>Notes</title>
-
- <para><emphasis role="bold">Access Control nodetypes are not
- extendible:</emphasis> The access control mechanism works for <emphasis
- role="bold">exo:owneable</emphasis> and <emphasis
- role="bold">exo:privilegeable</emphasis> nodetypes only, not for their
- subtypes! So you can NOT extend those nodetypes.</para>
-
+ <para><emphasis role="bold">Access Control nodetypes are not extendible:</emphasis> The access control mechanism works for <emphasis role="bold">exo:owneable</emphasis> and <emphasis role="bold">exo:privilegeable</emphasis> nodetypes only, not for their
+ subtypes! So you cannot extend those nodetypes.</para>
<para><emphasis role="bold">Autocreation:</emphasis> By default, newly
- created nodes are neither <emphasis
- role="bold">exo:privilegeable</emphasis> nor <emphasis
- role="bold">exo:owneable</emphasis> but it is possible to configure the
- repository to auto-create <emphasis
- role="bold">exo:privilegeable</emphasis> or/and <emphasis
- role="bold">exo:owneable</emphasis> thanks to eXo's JCR interceptors
- extension (see <link linkend="JCR.Extensions">JCR
- Extensions</link>)</para>
-
+ created nodes are neither <emphasis role="bold">exo:privilegeable</emphasis> nor <emphasis role="bold">exo:owneable</emphasis> but it is possible to configure the
+ repository to auto-create <emphasis role="bold">exo:privilegeable</emphasis> or/and <emphasis role="bold">exo:owneable</emphasis> thanks to eXo's JCR interceptors
+ extension (see <link linkend="JCR.Extensions">JCR Extensions</link>)</para>
<para><emphasis role="bold">OR-based Privilege Inheritance</emphasis>:
- Note, that eXo's Access Control implementation supports a privilege
+ Note, that eXo's Access Control implementation supports a privilege
inheritance that follows a strategy of either...or/ and has only an
ALLOW privilege mechanism (there is no DENY feature). This means that a
- session is allowed to perform some operation on some nodes if its
+ session is allowed to perform some operations on some nodes if its
identity has an appropriate permission assigned to this node. Only if
there is no exo:permission property assigned to the node itself, the
- permissions of the node's ancestors are used.</para>
+ permissions of the node's ancestors are used.</para>
</section>
-
<section>
<title>Example</title>
-
<section>
<title>XML Example</title>
-
- <para>In the following example, you see a node named "Politics" which
- contains two nodes named "Cats" and "Dogs".</para>
-
+ <para>In the following example, you see a node named "Politics" which
+ contains two nodes named "Cats" and "Dogs".</para>
<note>
- <para>These examples are exported from eXo DMS using the \"document
- view\" representation of JCR. Each value of a multivalue property is
+ <para>These examples are exported from eXo DMS using the \"document
+ view\" representation of JCR. Each value of a multi-value property is
separated by a whitespace, each whitespace is escaped by
<emphasis>x0020</emphasis>.</para>
</note>
+ <programlisting><Politics jcr:primaryType="nt:unstructured" jcr:mixinTypes="exo:owneable exo:datetime exo:privilegeable" exo:dateCreated="2009-10-08T18:02:43.687+02:00"
+exo:dateModified="2009-10-08T18:02:43.703+02:00"
+exo:owner="root"
+exo:permissions="any_x0020_read *:/platform/administrators_x0020_read *:/platform/administrators_x0020_add_node *:/platform/administrators_x0020_set_property *:/platform/administrators_x0020_remove">
- <programlisting><Politics jcr:primaryType="nt:unstructured" jcr:mixinTypes="exo:owneable exo:datetime exo:privilegeable" exo:dateCreated="2009-10-08T18:02:43.687+02:00"
-exo:dateModified="2009-10-08T18:02:43.703+02:00"
-exo:owner="root"
-exo:permissions="any_x0020_read *:/platform/administrators_x0020_read *:/platform/administrators_x0020_add_node *:/platform/administrators_x0020_set_property *:/platform/administrators_x0020_remove">
+<Cats jcr:primaryType="exo:article"
+jcr:mixinTypes="exo:owneable"
+exo:owner="marry"
+exo:summary="The_x0020_secret_x0020_power_x0020_of_x0020_cats_x0020_influences_x0020_the_x0020_leaders_x0020_of_x0020_the_x0020_world."
+exo:text="" exo:title="Cats_x0020_rule_x0020_the_x0020_world" />
-<Cats jcr:primaryType="exo:article"
-jcr:mixinTypes="exo:owneable"
-exo:owner="marry"
-exo:summary="The_x0020_secret_x0020_power_x0020_of_x0020_cats_x0020_influences_x0020_the_x0020_leaders_x0020_of_x0020_the_x0020_world."
-exo:text="" exo:title="Cats_x0020_rule_x0020_the_x0020_world" />
+<Dogs jcr:primaryType="exo:article"
+jcr:mixinTypes="exo:privilegeable"
+exo:permissions="manager:/organization_x0020_read manager:/organization_x0020_set_property"
+exo:summary="Dogs"
+exo:text="" exo:title="Dogs_x0020_are_x0020_friends" />
-<Dogs jcr:primaryType="exo:article"
-jcr:mixinTypes="exo:privilegeable"
-exo:permissions="manager:/organization_x0020_read manager:/organization_x0020_set_property"
-exo:summary="Dogs"
-exo:text="" exo:title="Dogs_x0020_are_x0020_friends" />
-
</Politics></programlisting>
-
- <para>The "Politics" node is <emphasis
- role="bold">exo:owneable</emphasis> and <emphasis
- role="bold">exo:privilegeable</emphasis>. It has both an <emphasis
- role="bold">exo:owner</emphasis> property and also an <emphasis
- role="bold">exo:permissions</emphasis> property. There is an <emphasis
- role="bold">exo:owner="root"</emphasis> property so that the user root
- is the owner. In the exo:permissions value you can see the ACL, a list
- of access controls. In this example, the group <emphasis
- role="bold">\</emphasis>:/platform/administrators* has all rights on
- this node (remember that the "\*" means any kind of membership/role).
- Furthermore, <emphasis role="bold">any</emphasis> has the read
- permission.</para>
-
- <para>As you can see in the jcr:mixinTypes property the "Cats" node is
- <emphasis role="bold">exo:owneable</emphasis>; hence there is an
- <emphasis role="bold">exo:owner="marry"</emphasis> property so that
- the user marry is the owner. The "Cats" node is <emphasis
- role="bold">not exo:privilegeable</emphasis> and has <emphasis
- role="bold">no exo:permissions</emphasis>. In this case, the <emphasis
- role="bold">inheritance mechanism</emphasis> enters the game: The
- "Cats" node has the same permissions as "Politics" node.</para>
-
- <para>Finally, the "Dogs" node is also a child node of "Politics".
- This node is <emphasis role="bold">not exo:owneable</emphasis> and
- inherits the owner of the "Politics" node (which is the user root).
- Otherwise, "Dogs" is <emphasis
- role="bold">exo:privilegeable</emphasis> and therefore has its own
+ <para>The "Politics" node is <emphasis role="bold">exo:owneable</emphasis> and <emphasis role="bold">exo:privilegeable</emphasis>. It has both an <emphasis role="bold">exo:owner</emphasis> property and an <emphasis role="bold">exo:permissions</emphasis> property. There is an <emphasis role="bold">exo:owner="root"</emphasis> property so that the user root
+ is the owner. In the exo:permissions value, you can see the ACL that is a list
+ of access controls. In this example, the group <emphasis role="bold">*:/platform/administrators</emphasis> has all rights on
+ this node (remember that the "<emphasis role="bold">*</emphasis>" means any kind of membership).
+ <emphasis role="bold">any</emphasis> means that any users also have the read
+ permission.s</para>
+ <para>As you see in the jcr:mixinTypes property, the "Cats" node is
+ <emphasis role="bold">exo:owneable</emphasis> and there is an
+ <emphasis role="bold">exo:owner="marry"</emphasis> property so that
+ the user marry is the owner. The "Cats" node is <emphasis role="bold">not exo:privilegeable</emphasis> and has <emphasis role="bold">no exo:permissions</emphasis>. In this case, we can see the <emphasis role="bold">inheritance mechanism</emphasis> here is that the
+ "Cats" node has the same permissions as "Politics" node.</para>
+ <para>Finally, the "Dogs" node is also a child node of "Politics".
+ This node is <emphasis role="bold">not</emphasis> <emphasis role="bold">exo:owneable</emphasis> and
+ inherits the owner of the "Politics" node (which is the user root).
+ Otherwise, "Dogs" is <emphasis role="bold">exo:privilegeable</emphasis> and therefore, it has its own
<emphasis role="bold">exo:permissions</emphasis>. That means only the
- users having a "manager" role in the group "/organization" and the
- user "root" have the rights to access this node - all others have no
- access rights.</para>
+ users having a "manager" role in the group "/organization" and the
+ user "root" have the rights to access this node.</para>
</section>
-
<section>
<title>Inheritance Examples</title>
-
<para>Here is an example showing the accessibility of two nodes (to
- show inheritance) for two sample users named <emphasis
- role="bold">manager</emphasis> and <emphasis
- role="bold">user</emphasis>:</para>
-
- <para>The "+" symbol means that there is a child node
- "exo:owneable".</para>
-
+ show inheritance) for two sample users named <emphasis role="bold">manager</emphasis> and <emphasis role="bold">user</emphasis>:</para>
+ <para>The "+" symbol means that there is a child node
+ "exo:owneable".</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/other/acl.gif" />
+ <imagedata fileref="images/other/acl.gif"/>
</imageobject>
</mediaobject>
</section>
-
<section>
<title>Permission validation</title>
-
- <para>There is a description how permission is validated for different
- jcr actions</para>
-
+ <para>This session describes how permission is validated for different
+ JCR actions.</para>
<itemizedlist>
<listitem>
- <para><emphasis role="bold">read node</emphasis>: check read
- permission on target node.</para>
-
- <para>For example. Read /node1/<emphasis
- role="bold">subnode</emphasis> node - jcr will check "read"
- permission exactly on "subnode".</para>
+ <para><emphasis role="bold">read node</emphasis>: Check the read
+ permission on a target node.</para>
+ <para>For example: Read /node1/<emphasis role="bold">subnode</emphasis> node, JCR will check the "read"
+ permission exactly on "subnode".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">read property</emphasis> : check read
- permission on parent node.</para>
-
- <para>For example. Read /<emphasis
- role="bold">node1</emphasis>/myprop - jcr will check "read"
- permission on "node1".</para>
+ <para><emphasis role="bold">read property</emphasis> : Check the read
+ permission on a parent node.</para>
+ <para>For example: Read /<emphasis role="bold">node1</emphasis>/myprop - JCR will check the "read"
+ permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">add node</emphasis>: check add_node on
- parent node</para>
-
- <para>For example. Try to add /<emphasis
- role="bold">node1</emphasis>/sybnode node - jcr will check
- "add_node" permission on "node1".</para>
+ <para><emphasis role="bold">add node</emphasis>: Check add_node on a parent node.</para>
+ <para>For example: Add /<emphasis role="bold">node1</emphasis>/subnode node, JCR will check the
+ "add_node" permission on "node1".</para>
</listitem>
-
<listitem>
<para><emphasis role="bold">set property</emphasis>: set_property
- on parent node</para>
-
- <para>For example. Try to set /<emphasis
- role="bold">node1</emphasis>/myprop property - jcr will check
- "set_property" permission on "node1".</para>
+ on a parent node.</para>
+ <para>For example: Try to set /<emphasis role="bold">node1</emphasis>/myprop property, JCR will check
+ the "set_property" permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">remove node</emphasis>: check remove
- permission on target node.</para>
-
- <para>For example. Try to remove /node1/<emphasis
- role="bold">subnode</emphasis> node - jcr will check "remove"
- permission on "subnode".</para>
+ <para><emphasis role="bold">remove node</emphasis>: Check the remove
+ permission on a target node.</para>
+ <para>For example: Try to remove /node1/<emphasis role="bold">subnode</emphasis> node, JCR will check the "remove"
+ permission on "subnode".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">remove property</emphasis>: check
- remove permission on parent node</para>
-
- <para>For example. Try to remove /<emphasis
- role="bold">node1</emphasis>/myprop property - jcr will check
- "remove" permission on "node1".</para>
+ <para><emphasis role="bold">remove property</emphasis>: Check the
+ remove permission on a parent node.</para>
+ <para>For example: Try to remove /<emphasis role="bold">node1</emphasis>/myprop property, JCR will check
+ the "remove" permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">add mixin</emphasis>: check "add_node"
- and "set_property" permission on target node</para>
-
- <para>For example. Try add mixin to /node1/<emphasis
- role="bold">subnode</emphasis> node - jcr will check "add_node"
- and "set_property" permission on "subnode".</para>
+ <para><emphasis role="bold">add mixin</emphasis>: Check the "add_node"
+ and "set_property" permission on a target node.</para>
+ <para>For example: Try to add mixin to /node1/<emphasis role="bold">subnode</emphasis> node, JCR will check the "add_node"
+ and "set_property" permission on "subnode".</para>
</listitem>
</itemizedlist>
-
<note>
- <para>Behavior of the permission "remove" and "add mixin" validation
+ <para>The behavior of the permission "remove" and "add mixin" validation
has changed since JCR 1.12.6-GA. The old behavior is:</para>
-
<para><itemizedlist>
<listitem>
- <para><emphasis role="bold">remove node</emphasis>: check
- remove permission on parent node</para>
-
- <para>For example. Try to remove /<emphasis
- role="bold">node1</emphasis>/subnode node - jcr will check
- "remove" permission on "node1".</para>
+ <para><emphasis role="bold">remove node</emphasis>: Check
+ the remove permission on a parent node.</para>
+ <para>For example: Try to remove /<emphasis role="bold">node1</emphasis>/subnode node, JCR will check
+ the "remove" permission on "node1".</para>
</listitem>
-
<listitem>
- <para><emphasis role="bold">add mixin</emphasis>: check
- "add_node" and "set_property" permission on parent node</para>
-
- <para>For example. Try add mixin to /<emphasis
- role="bold">node1</emphasis>/subnode node - jcr will check
- "add_node" and "set_property" permission on "node1".</para>
+ <para><emphasis role="bold">add mixin</emphasis>: Check
+ the "add_node" and "set_property" permission on a parent node.</para>
+ <para>For example: Try to add mixin to /<emphasis role="bold">node1</emphasis>/subnode node, JCR will check
+ the "add_node" and "set_property" permission on "node1".</para>
</listitem>
</itemizedlist></para>
</note>
</section>
</section>
-
<section>
<title>Java API</title>
-
- <para>eXo JCR's ExtendedNode interface which extends javax.jcr.Node
+ <para>eXo JCR's ExtendedNode interface which extends javax.jcr.Node
interface provides additional methods for Access Control
management.</para>
-
<table>
<title>Additional methods</title>
-
<tgroup cols="2">
<thead>
<row>
<entry>Method signature</entry>
-
<entry>Description</entry>
</row>
</thead>
-
<tbody>
<row>
- <entry>void setPermissions(Map<String, String[]>
- permissions)</entry>
-
+ <entry>void setPermissions(Map<String, String[]> permissions)</entry>
<entry>Assigns a set of Permissions to a node</entry>
</row>
-
<row>
- <entry>void setPermission(String identity, String[]
- permission)</entry>
-
- <entry>Assigns some Identity's Permission to a node</entry>
+ <entry>void setPermission(String identity, String[] permission)</entry>
+ <entry>Assigns some Identities' Permission to a node</entry>
</row>
-
<row>
<entry>void removePermission(String identity)</entry>
-
- <entry>Remove Identity's Permission</entry>
+ <entry>Removes an Identity's Permission</entry>
</row>
-
<row>
- <entry>void removePermission(String identity, String
- permission)</entry>
-
- <entry>Remove the specified permission for a particular
- identity</entry>
+ <entry>void removePermission(String identity, String permission)</entry>
+ <entry>Removes the specified permission for a particular identity</entry>
</row>
-
<row>
<entry>void clearACL()</entry>
-
<entry>Clears the current ACL so it becomes default</entry>
</row>
-
<row>
<entry>AccessControlList getACL()</entry>
-
<entry>Returns the current ACL</entry>
</row>
-
<row>
<entry>void checkPermission(String actions)</entry>
-
- <entry>Checks Permission (AccessDeniedException will be thrown
- if denied)</entry>
+ <entry>Checks Permission (AccessDeniedException will be thrown if denied)</entry>
</row>
</tbody>
</tgroup>
</table>
-
- <para>The "identity" parameter is the user or group name. The
+ <para>The "identity" parameter is a user or a group name. The
permissions are the literal strings of the standard action permissions
- (add_node, set_property, remove, read.</para>
+ (add_node, set_property, remove, read).</para>
</section>
</section>
</chapter>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,398 +1,307 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<chapter id="JCR.WebDAV">
- <?dbhtml filename="ch-webdav.html"?>
-
- <title>WebDAV</title>
-
- <section>
- <title>Related documents</title>
-
- <itemizedlist>
- <listitem>
- <para><link linkend="JCR.LinkProducerService">Link
- Producer</link></para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section>
- <title>Introduction</title>
-
- <para>The WebDAV protocol allows you to use third party tools to
- communicate with hierarchical content servers via HTTP. It is possible to
- add and remove documents or a set of documents from a path on the server.
- DeltaV is an extension of the WebDav protocol that allows to manage
- document versioning. Locking guarantees protection against multiple access
- when writing resources. The ordering support allows to change the position
- of the resource in the list and sort the directory for the convenience of
- viewing the directory tree. The full-text search makes it easy to find the
- necessary documents. You can search by using two languages: SQL and
- XPATH.</para>
-
- <para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
- from the extension modules of the reference implementation - on the top of
- our JCR implementation so that it is possible to browse a workspace using
- the third party tools (it can be Windows folders or Mac ones as well as a
- Java WebDAV client such as DAVExplorer or IE using File->Open as a Web
- Folder).</para>
-
- <para>Now WebDav is an extension of the REST service. To get the WebDav
- server ready, you must deploy the REST application. Then, you can access
- any workspaces of your repository by using the following URL:</para>
-
- <para>Standalone mode:</para>
-
- <para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
-
- <para>Portal mode:</para>
-
- <para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}...</uri></para>
-
- <para>When accessing the WebDAV server - here URL is
- <uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
- also use "collaboration" (instead of "production") which is the default
- workspace in eXo products - the user will be asked to enter his login and
- password. Those will then be checked by using the organization service
- (that can be implemented thanks to an Inmemory(dummy) module or DB module
- or LDAP one) and the JCR user session will be created with the correct JCR
- Credentials.</para>
-
- <para><emphasis role="bold">NOTE:</emphasis> If you try the "in ECM"
- option, add "@ecm" to the user's password. Alternatively, you may modify
- jaas.conf adding the <emphasis role="bold">domain=ecm</emphasis> option
- like:</para>
-
- <programlisting>exo-domain {
- org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
-};</programlisting>
- </section>
-
- <section>
- <title>Configuration</title>
-
- <programlisting><component>
- <key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
- <type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
- <init-params>
-
- <!-- this parameter indicates the default login and password values
- used as credentials for accessing the repository -->
- <!-- value-param>
- <name>default-identity</name>
- <value>admin:admin</value>
- </value-param -->
-
- <!-- this is the value of WWW-Authenticate header -->
- <value-param>
- <name>auth-header</name>
- <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
- </value-param>
-
- <!-- default node type which is used for the creation of collections -->
- <value-param>
- <name>def-folder-node-type</name>
- <value>nt:folder</value>
- </value-param>
-
- <!-- default node type which is used for the creation of files -->
- <value-param>
- <name>def-file-node-type</name>
- <value>nt:file</value>
- </value-param>
-
- <!-- if MimeTypeResolver can't find the required mime type,
- which conforms with the file extension, and the mimeType header is absent
- in the HTTP request header, this parameter is used
- as the default mime type-->
- <value-param>
- <name>def-file-mimetype</name>
- <value>application/octet-stream</value>
- </value-param>
-
- <!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
- In case of "create-version", PUT command creates the new version of the resource if this resource exists.
- In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
- In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
-
- <value-param>
- <name>update-policy</name>
- <value>create-version</value>
- <!--value>replace</value -->
- <!-- value>add</value -->
- </value-param>
-
- <!--
- This parameter determines how service responds to a method that attempts to modify file content.
- In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
- In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
- -->
- <value-param>
- <name>auto-version</name>
- <value>checkout-checkin</value>
- <!--value>checkout</value -->
- </value-param>
-
- <!--
- This parameter is responsible for managing Cache-Control header value which will be returned to the client.
- You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
- -->
- <value-param>
- <name>cache-control</name>
- <value>text/xml,text/html:max-age=3600;image/png,image/jpg:max-age=1800;*/*:no-cache;</value>
- </value-param>
-
- <!--
- This parameter determines the absolute path to the folder icon file, which is shown
- during WebDAV view of the contents
- -->
- <value-param>
- <name>folder-icon-path</name>
- <value>/absolute/path/to/file</value>
- </value-param>
-
- </init-params
-</component></programlisting>
- </section>
-
- <section>
- <title>Screenshots</title>
-
- <para>At present, eXo JCR WebDav server was tested by using MS Internet
- Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav
- Explorer</ulink>, <ulink
- url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos
- Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
-
- <section>
- <title>MS Internet Explorer</title>
-
- <para>(File -> Open as Web Folder)</para>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_explorer.jpg" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section>
- <title>Dav Explorer</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_davexplorer.jpg" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section>
- <title>Xythos Drive</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_xythosdrive.jpg" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section>
- <title>Microsoft Office 2003</title>
-
- <para>(as client) (File->Open with typing http://... href in the file
- name box)</para>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_msoffice2003.jpg" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section>
- <title>Ubuntu Linux</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg" />
- </imageobject>
- </mediaobject>
- </section>
- </section>
-
- <section>
- <title>Comparison table of WebDav and JCR commands</title>
-
- <table>
- <title></title>
-
- <tgroup cols="2">
- <thead>
- <row>
- <entry>WebDav</entry>
-
- <entry>JCR</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>COPY</entry>
-
- <entry>Workspace.copy(...)</entry>
- </row>
-
- <row>
- <entry>DELETE</entry>
-
- <entry>Node.remove()</entry>
- </row>
-
- <row>
- <entry>GET</entry>
-
- <entry>Node.getProperty(...); Property.getValue()</entry>
- </row>
-
- <row>
- <entry>HEAD</entry>
-
- <entry>Node.getProperty(...); Property.getLength()</entry>
- </row>
-
- <row>
- <entry>MKCOL</entry>
-
- <entry>Node.addNode(...)</entry>
- </row>
-
- <row>
- <entry>MOVE</entry>
-
- <entry>Session.move(...) or Workspace.move(...)</entry>
- </row>
-
- <row>
- <entry>PROPFIND</entry>
-
- <entry>Session.getNode(...); Node.getNode(...);
- Node.getNodes(...); Node.getProperties()</entry>
- </row>
-
- <row>
- <entry>PROPPATCH</entry>
-
- <entry>Node.setProperty(...);
- Node.getProperty(...).remove()</entry>
- </row>
-
- <row>
- <entry>PUT</entry>
-
- <entry>Node.addNode("node","nt:file");
- Node.setProperty("jcr:data", "data")</entry>
- </row>
-
- <row>
- <entry>CHECKIN</entry>
-
- <entry>Node.checkin()</entry>
- </row>
-
- <row>
- <entry>CHECKOUT</entry>
-
- <entry>Node.checkout()</entry>
- </row>
-
- <row>
- <entry>REPORT</entry>
-
- <entry>Node.getVersionHistory(); VersionHistory.getAllVersions();
- Version.getProperties()</entry>
- </row>
-
- <row>
- <entry>RESTORE</entry>
-
- <entry>Node.restore(...)</entry>
- </row>
-
- <row>
- <entry>UNCHECKOUT</entry>
-
- <entry>Node.restore(...)</entry>
- </row>
-
- <row>
- <entry>VERSION-CONTROL</entry>
-
- <entry>Node.addMixin("mix:versionable")</entry>
- </row>
-
- <row>
- <entry>LOCK</entry>
-
- <entry>Node.lock(...)</entry>
- </row>
-
- <row>
- <entry>UNLOCK</entry>
-
- <entry>Node.unlock()</entry>
- </row>
-
- <row>
- <entry>ORDERPATCH</entry>
-
- <entry>Node.orderBefore(...)</entry>
- </row>
-
- <row>
- <entry>SEARCH</entry>
-
- <entry>Workspace.getQueryManager(); QueryManager.createQuery();
- Query.execute()</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
- <section>
- <title>Restrictions</title>
-
- <para>There are some restrictions for webdav in different Operating
- systems.</para>
-
- <section>
- <title>Windows 7</title>
-
- <para>When you try to setup a web folder by “adding a network location”
- or “map a network drive” through My Computer, you can get an error
- saying that either “The folder you entered does not appear to be valid.
- Please choose another” or “Windows cannot access… Check the spelling of
- the name. Otherwise, there might be…”. These errors appear whether I’m
- using SSL or non-SSL.</para>
-
- <para>To fix this follow such steps:</para>
-
- <orderedlist>
- <listitem>
- <para>Go to Windows Registry Editor</para>
- </listitem>
-
- <listitem>
- <para>Find a key:
- \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
- </para>
- </listitem>
-
- <listitem>
- <para>Change the value to 2 </para>
- </listitem>
- </orderedlist>
- </section>
- </section>
-</chapter>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
+<chapter id="JCR.WebDAV">
+<?dbhtml filename="ch-webdav.html"?> <title>WebDAV</title>
+ <section>
+ <title>Related documents</title>
+ <itemizedlist>
+ <listitem>
+ <para><link linkend="JCR.LinkProducerService">Link Producer</link></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Introduction</title>
+ <para>The WebDAV protocol enables you to use the third party tools to
+ communicate with hierarchical content servers via HTTP. It is possible to
+ add and remove documents or a set of documents from a path on the server.
+ DeltaV is an extension of the WebDav protocol that allows managing
+ document versioning. Locking guarantees protection against multiple access
+ when writing resources. The ordering support allows changing the position
+ of the resource in the list and sort the directory to make the directory tree viewed conveniently. The full-text search makes it easy to find the
+ necessary documents. You can search by using two languages: SQL and
+ XPATH.</para>
+ <para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
+ from the extension modules of the reference implementation - on the top of
+ our JCR implementation so that it is possible to browse a workspace using
+ the third party tools (it can be Windows folders or Mac ones as well as a
+ Java WebDAV client, such as DAVExplorer or IE using File->Open as a Web
+ Folder).</para>
+ <para>Now WebDav is an extension of the REST service. To get the WebDav
+ server ready, you must deploy the REST application. Then, you can access
+ any workspaces of your repository by using the following URL:</para>
+ <para>Standalone mode:</para>
+ <para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
+ <para>Portal mode:</para>
+ <para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}...</uri></para>
+ <para>When accessing the WebDAV server with the URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
+ also use "collaboration" (instead of "production") which is the default
+ workspace in eXo products. You will be asked to enter your login and
+ password. Those will then be checked by using the organization service
+ that can be implemented thanks to an InMemory (dummy) module or a DB module
+ or an LDAP one and the JCR user session will be created with the correct JCR
+ Credentials.</para>
+ <note>
+ <para>If you try the "in ECM"
+ option, add "@ecm" to the user's password. Alternatively, you may modify
+ jaas.conf by adding the <emphasis role="bold">domain=ecm</emphasis> option
+ as follows:</para>
+ <programlisting>exo-domain {
+ org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
+};</programlisting>
+ </note>
+ </section>
+ <section>
+ <title>Configuration</title>
+ <programlisting><component>
+ <key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
+ <type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
+ <init-params>
+
+ <!-- this parameter indicates the default login and password values
+ used as credentials for accessing the repository -->
+ <!-- value-param>
+ <name>default-identity</name>
+ <value>admin:admin</value>
+ </value-param -->
+
+ <!-- this is the value of WWW-Authenticate header -->
+ <value-param>
+ <name>auth-header</name>
+ <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
+ </value-param>
+
+ <!-- default node type which is used for the creation of collections -->
+ <value-param>
+ <name>def-folder-node-type</name>
+ <value>nt:folder</value>
+ </value-param>
+
+ <!-- default node type which is used for the creation of files -->
+ <value-param>
+ <name>def-file-node-type</name>
+ <value>nt:file</value>
+ </value-param>
+
+ <!-- if MimeTypeResolver can't find the required mime type,
+ which conforms with the file extension, and the mimeType header is absent
+ in the HTTP request header, this parameter is used
+ as the default mime type-->
+ <value-param>
+ <name>def-file-mimetype</name>
+ <value>application/octet-stream</value>
+ </value-param>
+
+ <!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
+ In case of "create-version", PUT command creates the new version of the resource if this resource exists.
+ In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
+ In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
+
+ <value-param>
+ <name>update-policy</name>
+ <value>create-version</value>
+ <!--value>replace</value -->
+ <!-- value>add</value -->
+ </value-param>
+
+ <!--
+ This parameter determines how service responds to a method that attempts to modify file content.
+ In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
+ In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
+ -->
+ <value-param>
+ <name>auto-version</name>
+ <value>checkout-checkin</value>
+ <!--value>checkout</value -->
+ </value-param>
+
+ <!--
+ This parameter is responsible for managing Cache-Control header value which will be returned to the client.
+ You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
+ -->
+ <value-param>
+ <name>cache-control</name>
+ <value>text/xml,text/html:max-age=3600;image/png,image/jpg:max-age=1800;*/*:no-cache;</value>
+ </value-param>
+
+ <!--
+ This parameter determines the absolute path to the folder icon file, which is shown
+ during WebDAV view of the contents
+ -->
+ <value-param>
+ <name>folder-icon-path</name>
+ <value>/absolute/path/to/file</value>
+ </value-param>
+
+ </init-params
+</component></programlisting>
+ </section>
+ <section>
+ <title>Screenshots</title>
+ <para>At present, eXo JCR WebDav server is tested by using MS Internet
+ Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav Explorer</ulink>, <ulink url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+ <section>
+ <title>MS Internet Explorer</title>
+ <para>(File -> Open as Web Folder)</para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_explorer.jpg"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ <section>
+ <title>Dav Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_davexplorer.jpg"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ <section>
+ <title>Xythos Drive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_xythosdrive.jpg"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ <section>
+ <title>Microsoft Office 2003</title>
+ <para>(as client) (File->Open with typing http://... href in the file
+ name box)</para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_msoffice2003.jpg"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ <section>
+ <title>Ubuntu Linux</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ </section>
+ <section>
+ <title>Comparison table of WebDav and JCR commands</title>
+ <table>
+ <title/>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>WebDav</entry>
+ <entry>JCR</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>COPY</entry>
+ <entry>Workspace.copy(...)</entry>
+ </row>
+ <row>
+ <entry>DELETE</entry>
+ <entry>Node.remove()</entry>
+ </row>
+ <row>
+ <entry>GET</entry>
+ <entry>Node.getProperty(...); Property.getValue()</entry>
+ </row>
+ <row>
+ <entry>HEAD</entry>
+ <entry>Node.getProperty(...); Property.getLength()</entry>
+ </row>
+ <row>
+ <entry>MKCOL</entry>
+ <entry>Node.addNode(...)</entry>
+ </row>
+ <row>
+ <entry>MOVE</entry>
+ <entry>Session.move(...) or Workspace.move(...)</entry>
+ </row>
+ <row>
+ <entry>PROPFIND</entry>
+ <entry>Session.getNode(...); Node.getNode(...); Node.getNodes(...); Node.getProperties()</entry>
+ </row>
+ <row>
+ <entry>PROPPATCH</entry>
+ <entry>Node.setProperty(...); Node.getProperty(...).remove()</entry>
+ </row>
+ <row>
+ <entry>PUT</entry>
+ <entry>Node.addNode("node","nt:file"); Node.setProperty("jcr:data", "data")</entry>
+ </row>
+ <row>
+ <entry>CHECKIN</entry>
+ <entry>Node.checkin()</entry>
+ </row>
+ <row>
+ <entry>CHECKOUT</entry>
+ <entry>Node.checkout()</entry>
+ </row>
+ <row>
+ <entry>REPORT</entry>
+ <entry>Node.getVersionHistory(); VersionHistory.getAllVersions(); Version.getProperties()</entry>
+ </row>
+ <row>
+ <entry>RESTORE</entry>
+ <entry>Node.restore(...)</entry>
+ </row>
+ <row>
+ <entry>UNCHECKOUT</entry>
+ <entry>Node.restore(...)</entry>
+ </row>
+ <row>
+ <entry>VERSION-CONTROL</entry>
+ <entry>Node.addMixin("mix:versionable")</entry>
+ </row>
+ <row>
+ <entry>LOCK</entry>
+ <entry>Node.lock(...)</entry>
+ </row>
+ <row>
+ <entry>UNLOCK</entry>
+ <entry>Node.unlock()</entry>
+ </row>
+ <row>
+ <entry>ORDERPATCH</entry>
+ <entry>Node.orderBefore(...)</entry>
+ </row>
+ <row>
+ <entry>SEARCH</entry>
+ <entry>Workspace.getQueryManager(); QueryManager.createQuery(); Query.execute()</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Restrictions</title>
+ <para>There are some restrictions for WebDAV in different Operating
+ systems.</para>
+ <section>
+ <title>Windows 7</title>
+ <para>When you try to set up a web folder by “adding a network location”
+ or “map a network drive” through My Computer, you can get an error
+ message saying that either “The folder you entered does not appear to be valid.
+ Please choose another” or “Windows cannot access… Check the spelling of
+ the name. Otherwise, there might be…”. These errors may appear when you are
+ using SSL or non-SSL.</para>
+ <para>To fix this, do as follows:</para>
+ <orderedlist>
+ <listitem>
+ <para>Go to Windows Registry Editor.</para>
+ </listitem>
+ <listitem>
+ <para>Find a key:
+ \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
+ .</para>
+ </listitem>
+ <listitem>
+ <para>Change the value to 2.</para>
+ </listitem>
+ </orderedlist>
+ </section>
+ </section>
+</chapter>
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml 2011-01-28 10:38:13 UTC (rev 3900)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/job-scheduler-service.xml 2011-01-28 11:00:17 UTC (rev 3901)
@@ -1,142 +1,110 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<chapter id="Kernel.JobSchedulerService">
- <?dbhtml filename="ch-job-scheduler-service.html"?>
-
- <title>Job Scheduler Service</title>
-
+<?dbhtml filename="ch-job-scheduler-service.html"?> <title>Job Scheduler Service</title>
<section>
- <title>What is Job Scheduler</title>
-
- <para><emphasis role="bold">Job scheduler</emphasis> defines a job to
- execute a given number of times during a given period. It is a a software
- application that is in charge of unattended background executions,
- commonly known for historical reasons as batch processing.</para>
-
- <para>Today's job schedulers typically provide a graphical user interface
- and a single point of control for definition and monitoring of background
- executions in a distributed network of computers. Increasingly job
- schedulers are required to orchestrate the integration of real-time
- business activities with traditional background IT processing, across
- different operating system platforms and business application
- environments.</para>
-
- <para>Some features that may be found in a job scheduler include:</para>
-
+ <title>What is Job Scheduler?</title>
+ <para><emphasis role="bold">Job scheduler</emphasis> defines a job to execute a given number of times during a given period. It is a service that is in charge of unattended background executions, commonly known for historical reasons as batch processing. It is used to create and run jobs automatically and continuously, to schedule event-driven jobs and reports.</para>
+ </section>
+ <section>
+ <title>Where is Job Scheduler Service used in eXo Products?</title>
+ <para>Job Scheduler Service is widely used in many eXo products such as Social, DMS, WCM, eXo Knowledge and eXo Collaboration.</para>
+ <para>In eXo products, Job Schedulers are used to do some tasks as below:</para>
<itemizedlist>
<listitem>
- <para>Continuously automatic monitoring of jobs and completion
- notification</para>
+ <para>Automatically send notification, such as task/event reminder in the Calendar application of eXo Collaboration. </para>
</listitem>
- </itemizedlist>
-
- <itemizedlist>
<listitem>
- <para>Event-driven job scheduling</para>
+ <para>Automatically save chat messages from Openfire Server to History in the Chat application of eXo Collaboration. </para>
</listitem>
- </itemizedlist>
-
- <itemizedlist>
<listitem>
- <para>Performance monitoring</para>
+ <para>Inactivate topics in the Forum application of eXo Knowledge.</para>
</listitem>
- </itemizedlist>
-
- <itemizedlist>
<listitem>
- <para>Report scheduling</para>
+ <para>Calculate the number of active and online users in the Forum application of eXo Knowledge.</para>
</listitem>
+ <listitem>
+ <para>Automatically collect RSS items from various RSS resources to post to the activity stream of users and spaces in eXo Social.</para>
+ </listitem>
+ <listitem>
+ <para>Automatically send Newsletters to users in WCM.</para>
+ </listitem>
</itemizedlist>
+ <para>Also, it is used in Schedule lifecycle in DMS.</para>
+ <para>By using Job Scheduler Service in eXo kernel, many kinds of job can be configured to run, such as, addPeriodJob, addCronJob, addGlobalJobListener, addJobListener and many more. Just write a job (a class implements Job interface of quartz library and configures plug-in for JobSchedulerService and you're done. </para>
</section>
-
<section>
<title>How does Job Scheduler work?</title>
-
<para>Jobs are scheduled to run when a given Trigger occurs. Triggers can
be created with nearly any combination of the following directives:</para>
-
<itemizedlist>
<listitem>
<para>at a certain time of day (to the millisecond)</para>
</listitem>
-
<listitem>
<para>on certain days of the week</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>on certain days of the month</para>
</listitem>
-
<listitem>
<para>on certain days of the year</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>not on certain days listed within a registered Calendar (such as
business holidays)</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>repeated a specific number of times</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>repeated until a specific time/date</para>
</listitem>
-
<listitem>
<para>repeated indefinitely</para>
</listitem>
</itemizedlist>
-
<itemizedlist>
<listitem>
<para>repeated with a delay interval</para>
</listitem>
</itemizedlist>
-
<para>Jobs are given names by their creator and can also be organized into
named groups. Triggers may also be given names and placed into groups, in
order to easily organize them within the scheduler. Jobs can be added to
the scheduler once, but registered with multiple Triggers. Within a J2EE
environment, Jobs can perform their work as part of a distributed (XA)
transaction.</para>
-
+ <para>(Source: quartz-scheduler.org) </para>
<section>
<title>How can Job Scheduler Service be used in Kernel?</title>
-
- <para>Kernel leverages <ulink
- url="http://www.quartz-scheduler.org">Quartz</ulink> for its scheduler
+ <para>Kernel leverages <ulink url="http://www.quartz-scheduler.org">Quartz</ulink> for its scheduler
service and wraps <classname>org.quartz.Scheduler</classname> in
<classname>org.exoplatform.services.scheduler.impl.QuartzSheduler</classname>
for easier service wiring and configuration like any other services. To
- work with Quartz in Kernel, you'll mostly work with
+ work with Quartz in Kernel, you will mostly work with
<classname>org.exoplatform.services.scheduler.JobSchedulerService</classname>
(implemented by
<classname>org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl</classname>.</para>
-
<para>To use <classname>JobSchedulerService</classname>, you can
configure it as a component in the configuration.xml. Because
<classname>JobSchedulerService</classname> requires
<classname>QuartzSheduler</classname> and
<classname>QueueTasks</classname>, you also have to configure these two
components.</para>
-
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
<type>org.exoplatform.services.scheduler.impl.QuartzSheduler</type>
@@ -153,45 +121,38 @@
</configuration></programlisting>
</section>
-
<section>
<title>Samples</title>
-
- <para>We will work with <classname>JobSchedulerService</classname> by
+ <note>
+ <para>You can download the project code from <ulink url="https://github.com/hoatle/job-scheduler-service-tutorial">here</ulink></para>
+ </note>
+ <para>Work with <classname>JobSchedulerService</classname> by
creating a sample project and use GateIn-3.1.0-GA for testing.</para>
-
- <para>Firstly, create a project:</para>
-
+ <para>Firstly, create a project by using maven archetype plugin:</para>
<programlisting>mvn archetype:generate
-//....
-Choose version:
-1: 1.0
-2: 1.0-alpha-1
-3: 1.0-alpha-2
-4: 1.0-alpha-3
-5: 1.0-alpha-4
-Choose a number: : 1
-Define value for property 'groupId': : org.exoplatform.samples
-Define value for property 'artifactId': : exo.samples.scheduler
-Define value for property 'version': 1.0-SNAPSHOT: 1.0-SNAPSHOT
-Define value for property 'package': org.exoplatform.samples: jar
-Confirm properties configuration:
-groupId: org.exoplatform.samples
-artifactId: exo.samples.scheduler
-version: 1.0-SNAPSHOT
-package: jar
-Y: Y</programlisting>
-
- <para>Choose version as <emphasis role="bold">1.0-SNAPSHOT</emphasis>,
- groupId as <emphasis role="bold">org.exoplatform.samples</emphasis>,
- artifactId as <emphasis role="bold">exo.samples.scheduler</emphasis> and
- package as <emphasis role="bold">jar</emphasis>. Edit the pom.xml as
- following:</para>
-
+</programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>For project type: select <emphasis role="bold">maven-archetype-quickstart </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For groupId: select <emphasis role="bold">org.exoplatform.samples</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For artifactId: select <emphasis role="bold">exo.samples.scheduler</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For version: select<emphasis role="bold"> 1.0.0-SNAPSHOT</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For package: select <emphasis role="bold">org.exoplatform.samples.scheduler</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>Edit the pom.xml as follows:</para>
<programlisting><project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -203,274 +164,169 @@
<groupId>org.exoplatform.samples</groupId>
<artifactId>exo.samples.scheduler</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<name>eXo Samples For Scheduler</name>
<description>eXo Samples Code For Scheduler</description>
- <dependencies>
-
- <dependency>
- <groupId>quartz</groupId>
- <artifactId>quartz</artifactId>
- <version>1.5.2</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.component.common</artifactId>
- <scope>provided</scope>
- </dependency>
-
- </dependencies>
-</project></programlisting>
-
- <para>After that, create a eclipse project and then import into
- eclipse:</para>
-
+</project> </programlisting>
+ <para>Generate an eclipse project by using maven eclipse plugin and then import into eclipse:</para>
<programlisting>mvn eclipse:eclipse</programlisting>
-
- <para>We'll work with this project all the time through samples.</para>
-
+ <para>eXo Kernel makes it easier to work with job scheduler service. All you need is just to define your "job" class to be performed by implementing <emphasis role="italic">org.quartz.Job</emphasis> interface and add configuration for it. </para>
<section>
- <title>StartableScheduler for DumbJob example</title>
+ <title>Define a job</title>
+ <para>To define a job, do as follows:</para>
+ <para>Define your job to be performed. For example, the job <emphasis role="italic">DumbJob</emphasis> is defined as follows:</para>
+ <programlisting>package org.exoplatform.samples.scheduler.jobs;
- <itemizedlist>
- <listitem>
- <para>See how it works on Quartz at: <ulink
- url="http://www.quartz-scheduler.org/docs/tutorial/TutorialLesson03.html">http://www.quartz-scheduler.org/docs/tutorial/TutorialLesson03.html</ulink></para>
- </listitem>
- </itemizedlist>
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
- <itemizedlist>
- <listitem>
- <para>Create a package in created project: conf/portal and add a
- configuration configuration.xml as follows:</para>
- </listitem>
- </itemizedlist>
+/**
+ * DumbJob for executing a defined dumb job.
+ */
+public class DumbJob implements Job {
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ /**
+ * The logger
+ */
+ private static final Log LOG = ExoLogger.getLogger(DumbJob.class);
+
+ /**
+ * The job of the DumbJob will be done by executing this method.
+ *
+ * @param context
+ * @throws JobExecutionException
+ */
+ public void execute(JobExecutionContext context) throws JobExecutionException {
+ LOG.info("DumbJob is executing...");
+ }
+}</programlisting>
+ <para>All jobs are required to implement the method <emphasis role="italic">execute</emphasis> from <emphasis role="italic">org.quartz.Job</emphasis> interface. This method will be called whenever a job is performed. With <emphasis role="italic">DumbJob</emphasis>, you just use logging to see that it will work. By looking at the terminal, you will see the the log message: "DumbJob is executing..."</para>
+ </section>
+ <section>
+ <title>Job configuration</title>
+ <para>After defining the "job", the only next step is to configure it by using <emphasis role="italic">external-component-plugin</emphasis> configuration for <emphasis role="italic">org.exoplatform.services.scheduler.JobSchedulerService</emphasis>. You can use these methods below for setting component plugin:</para>
+ <programlisting>public void addPeriodJob(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.PeriodJob</emphasis>. This type of job is used to perform actions that are executed in a period of time. You have to define when this job is performed, when it ends, when it performs the first action, how many times it is executed and the period of time to perform the action. See the configuration sample below to understand more clearly:</para>
+ <programlisting><external-component-plugins>
+ <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
+ <component-plugin>
+ <name>PeriodJob Plugin</name>
+ <set-method>addPeriodJob</set-method>
+ <type>org.exoplatform.services.scheduler.PeriodJob</type>
+ <description>period job configuration</description>
+ <init-params>
+ <properties-param>
+ <name>job.info</name>
+ <description>dumb job executed periodically</description>
+ <property name="jobName" value="DumbJob"/>
+ <property name="groupName" value="DumbJobGroup"/>
+ <property name="job" value="org.exoplatform.samples.scheduler.jobs.DumbJob"/>
+ <property name="repeatCount" value="0"/>
+ <property name="period" value="60000"/>
+ <property name="startTime" value="+45"/>
+ <property name="endTime" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins></programlisting>
+ <programlisting>public void addCronJob(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.CronJob</emphasis>. This type of job is used to perform actions at specified time with Unix 'cron-like' definitions. The plugin uses "expression" field for specifying the 'cron-like' definitions to execute the job. This is considered as the most powerful and flexible job to define when it will execute. For example, at 12pm every day => "0 0 12 * * ?"; or at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday => "0 15 10 ? * MON-FRI". To see more about Cron expression, please refer to this article: <para><ulink url="http://en.wikipedia.org/wiki/CRON_expression">CRON expression</ulink>.</para>See the configuration sample below to understand more clearly:</para>
+ <programlisting><external-component-plugins>
+ <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
+ <component-plugin>
+ <name>CronJob Plugin</name>
+ <set-method>addCronJob</set-method>
+ <type>org.exoplatform.services.scheduler.CronJob</type>
+ <description>cron job configuration</description>
+ <init-params>
+ <properties-param>
+ <name>job.info</name>
+ <description>dumb job executed by cron expression</description>
+ <property name="jobName" value="DumbJob"/>
+ <property name="groupName" value="DumbJobGroup"/>
+ <property name="job" value="org.exoplatform.samples.scheduler.jobs.DumbJob"/>
+ <!-- The job will be performed at 10:15am every day -->
+ <property name="expression" value="0 15 10 * * ?"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins></programlisting>
+ <programlisting>public void addGlobalJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting>public void addJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.JobListener.</emphasis> This job listener is used so that it will be informed when a <emphasis role="italic">org.quartz.JobDetail</emphasis> executes.</para>
+ <programlisting>public void addGlobalTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <programlisting>public void addTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
+ <para>The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.TriggerListener</emphasis>. This trigger listener is used so that it will be informed when a <emphasis role="italic">org.quartz.Trigger</emphasis> fires.</para>
+ </section>
+ <section>
+ <title>Run the project</title>
+ <para>Create <emphasis role="italic">conf.portal</emphasis> package in your sample project. Add the configuration.xml file with the content as follows:</para>
+ <programlisting><?xml version="1.0" encoding="UTF-8"?>
<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
<type>org.exoplatform.services.scheduler.impl.QuartzSheduler</type>
</component>
-
<component>
<type>org.exoplatform.services.scheduler.QueueTasks</type>
</component>
-
<component>
<key>org.exoplatform.services.scheduler.JobSchedulerService</key>
<type>org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl</type>
</component>
- <component>
- <type>org.exoplatform.samples.scheduler.StartableScheduler</type>
- </component>
-
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
+ <component-plugin>
+ <name>PeriodJob Plugin</name>
+ <set-method>addPeriodJob</set-method>
+ <type>org.exoplatform.services.scheduler.PeriodJob</type>
+ <description>period job configuration</description>
+ <init-params>
+ <properties-param>
+ <name>job.info</name>
+ <description>dumb job executed periodically</description>
+ <property name="jobName" value="DumbJob"/>
+ <property name="groupName" value="DumbJobGroup"/>
+ <property name="job" value="org.exoplatform.samples.scheduler.jobs.DumbJob"/>
+ <property name="repeatCount" value="0"/>
+ <property name="period" value="60000"/>
+ <property name="startTime" value="+45"/>
+ <property name="endTime" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
</configuration></programlisting>
+ <para><emphasis role="italic">mvn clean install </emphasis>the project. Copy .jar file to<emphasis role="italic"> lib</emphasis> in tomcat bundled with GateIn-3.1.0-GA. Run <emphasis role="italic">bin/gatein.sh</emphasis> to see the <emphasis role="italic">DumbJob</emphasis> to be executed on the terminal when portal containers are initialized. Please look at the terminal to see the log message of <emphasis role="italic">DumbJob</emphasis>.</para>
+ <para>From now on, you can easily create any job to be executed in GateIn's portal by defining your job and configuring it.
- <itemizedlist>
- <listitem>
- <para>Note: You can see a component: StartableSheduler to be
- defined. It's a component startable when portal containers are
- initialized.</para>
- </listitem>
- </itemizedlist>
-
- <programlisting>package org.exoplatform.samples.scheduler;
-
-import java.util.Date;
-
-import org.exoplatform.samples.scheduler.jobs.DumbJob;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.scheduler.impl.QuartzSheduler;
-import org.picocontainer.Startable;
-import org.quartz.JobDetail;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.Trigger;
-import org.quartz.TriggerUtils;
-
-/**
- * Created by The eXo Platform SAS
- * Author : eXoPlatform
- * exo(a)exoplatform.com
- * Jul 1, 2010
- */
-public class StartableScheduler implements Startable {
- private static final Log LOG = ExoLogger.getLogger(StartableScheduler.class);
-
- public StartableScheduler(QuartzSheduler quartzScheduler) throws SchedulerException {
- LOG.info("Init StartableScheduler");
- JobDetail jobDetail = new JobDetail("myJob",
- Scheduler.DEFAULT_GROUP,
- DumbJob.class);
- Trigger trigger = TriggerUtils.makeImmediateTrigger(3, 5000);
- trigger.setStartTime(new Date());
- trigger.setName("myTrigger");
-
- Scheduler scheduler = quartzScheduler.getQuartzSheduler();
-
- scheduler.scheduleJob(jobDetail, trigger);
- }
-
- @Override
- public void start() {
- // TODO Auto-generated method stub
-
- }
- @Override
- public void stop() {
- // TODO Auto-generated method stub
-
- }
-}</programlisting>
-
- <itemizedlist>
- <listitem>
- <para>DumbJob is defined as a job:</para>
- </listitem>
- </itemizedlist>
-
- <programlisting>package org.exoplatform.samples.scheduler.jobs;
-
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-/**
- * DumbJob.java
- *
- * @author <a href="http://hoatle.net">hoatle (hoatlevan at gmail dot com)</a>
- * @since Jul 1, 2010
- * @copyright eXo SAS
- */
-public class DumbJob implements Job {
- private static final Log LOG = ExoLogger.getLogger(DumbJob.class);
- @Override
- public void execute(JobExecutionContext context) throws JobExecutionException {
- LOG.info("DumbJob is executing!");
- }
-
-}</programlisting>
-
- <para>mvn clean install the project. Copy jar file to lib in tomcat
- bundled with GateIn-3.1.0-GA. Run bin/gatein.sh to see the DumbJob
- executed on the terminal when portal containers are
- initialized.</para>
+</para>
</section>
</section>
-
- <section>
- <title>Where is Job Scheduler Service used in eXo Products?</title>
-
- <para>Job Service Scheduler (JSS) is used in many eXo products such as
- Social, DMS, WCM, KS and CS.</para>
-
- <para>For example: It is used in Schedule lifecycle in DMS.</para>
-
- <para>Also, it is used for News Letter Email Job in ECM, Reminder Job
- for calendar and History Job for chat in CS, Auto-count Active Users in
- KS.</para>
-
- <para>By using Job Scheduler Service in eXo kernel, many kinds of job
- can be configured to run. You can addPeriodJob, addCronJob,
- addGlobalJobListener, addJobListener and many more. Just write a job (a
- class implements Job interface of quartz library and config plugin for
- JobSchedulerService and you're done.</para>
- </section>
</section>
-
<section>
- <title>Advantages of Job Scheduler</title>
-
- <para>It's very useful to use Job Scheduler to create schedules for a lot
- of work, especially if they are spread across multiple machines. It's a
- tool to make that task a lot easier. Job Schedule is also widely used in
- almost eXo products such as: WCM, DMS, KS, CS, Social thanks to its
- benefits and advantages.</para>
-
- <itemizedlist>
- <listitem>
- <para>The Job Scheduler provides automatically log files for running
- programs</para>
- </listitem>
-
- <listitem>
- <para>The execution status of programs is automatically checked and an
- administrator will receive protocols by eMail</para>
- </listitem>
-
- <listitem>
- <para>The sequence of job starts can be organized depending on their
- execution status</para>
- </listitem>
-
- <listitem>
- <para>Job Schedulers are controlled by a graphical user
- interface</para>
- </listitem>
-
- <listitem>
- <para>Job Schedulers can be used to create complex job chains and job
- dependencies</para>
- </listitem>
- </itemizedlist>
-
- <para>Also, a wide variety of enterprise applications can take advantage
- of job schedulers. Job schedulers can enhance the functionality of
- enterprise applications as well as simplify their design. Furthermore, job
- scheduling components allow software development teams to focus on their
- applications and not on the intricate details of scheduling. By using
- server-side components, software teams can reduce development costs and
- bring their applications to market sooner.</para>
- </section>
-
- <section>
<title>Reference</title>
-
<para>To further understand about Job Scheduler, you can refer the
following links:</para>
-
<itemizedlist>
<listitem>
- <para><ulink
- url="http://www.quartz-scheduler.org/">http://www.quartz-scheduler.org/</ulink></para>
+ <para><ulink url="http://www.quartz-scheduler.org/">http://www.quartz-scheduler.org/</ulink></para>
</listitem>
-
<listitem>
- <para><ulink
- url="http://en.wikipedia.org/wiki/Job_scheduler">http://en.wikipedia.org/wiki/Job_scheduler</ulink></para>
+ <para><ulink url="http://en.wikipedia.org/wiki/Job_scheduler">http://en.wikipedia.org/wiki/Job_scheduler</ulink></para>
</listitem>
-
<listitem>
- <para><ulink
- url="http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...">http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...</ulink></para>
+ <para><ulink url="http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...">http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...</ulink></para>
</listitem>
-
<listitem>
- <para><ulink
- url="http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx</ulink></para>
+ <para><ulink url="http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx</ulink></para>
</listitem>
</itemizedlist>
</section>
13 years, 3 months
exo-jcr SVN: r3900 - jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-28 05:38:13 -0500 (Fri, 28 Jan 2011)
New Revision: 3900
Modified:
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
Log:
JCR-1580: Fix webdav docbook section since webdav bug with Mac OS Finder is fixed
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-01-28 10:36:39 UTC (rev 3899)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2011-01-28 10:38:13 UTC (rev 3900)
@@ -394,19 +394,5 @@
</listitem>
</orderedlist>
</section>
-
- <section>
- <title>Mac OS 10.5.3 and higher </title>
-
- <para>There is a known Finder bug started from Mac OS v.10.5.3 and not
- yet fixed.</para>
-
- <para>When you upload file to webdav server, the file will appear with 0
- kb. size. </para>
-
- <para>For more details follow: <ulink
- url="http://discussions.apple.com/thread.jspa?threadID=1538882&start=0&...">Apple
- Disscussion thread.</ulink></para>
- </section>
</section>
</chapter>
13 years, 3 months
exo-jcr SVN: r3899 - jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-28 05:36:39 -0500 (Fri, 28 Jan 2011)
New Revision: 3899
Modified:
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml
Log:
JCR-1561: Document Repository or Workspace initialization from backup
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml 2011-01-28 10:28:29 UTC (rev 3898)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/exojcr-backup-service.xml 2011-01-28 10:36:39 UTC (rev 3899)
@@ -380,6 +380,168 @@
</itemizedlist></para>
</section>
</section>
+
+ <section>
+ <title>Repository and Workspace initialization from backup</title>
+
+ <para>Repository and Workspace initialization from backup can use the
+ BackupWorkspaceInitializer.</para>
+
+ <para>Will be configured BackupWorkspaceInitializer in configuration of
+ workspace to restore the Workspace from backup over initializer.</para>
+
+ <para>Will be configured BackupWorkspaceInitializer in all
+ configurations workspaces of the Repository to restore the Repository
+ from backup over initializer. </para>
+
+ <para></para>
+
+ <para>Restoring the repository or workspace requires to shutdown the
+ repository.</para>
+
+ <para>Follow these steps : <itemizedlist>
+ <listitem>
+ <para>Stop repository (will be skipped this step if repository or
+ workace is not exists)</para>
+ </listitem>
+
+ <listitem>
+ <para>Clean database, value storage, index; (will be skipped this
+ step if repository or worksace is new)</para>
+ </listitem>
+
+ <listitem>
+ <para>In configuration, the workspace/-s set
+ BackupWorkspaceInitializer to refer to your backup.</para>
+ </listitem>
+
+ <listitem>
+ <para>Start repository</para>
+ </listitem>
+ </itemizedlist></para>
+
+ <para></para>
+
+ <para>Example of configuration initializer to restore workspace "backup"
+ over BackupWorkspaceInitializer:</para>
+
+ <programlisting><workspaces>
+ <workspace name="backup" ... >
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ ...
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.BackupWorkspaceInitializer">
+ <properties>
+ <property name="restore-path" value="D:\java\exo-working\backup\repository_backup-20110120_044734"/>
+ </properties>
+ </initializer>
+ ...
+</workspace></programlisting>
+
+ <section>
+ <title>Restore the Workspace over BackupWorksaceInitializer</title>
+
+ <para>Example of configuration initializer to resore the workspace
+ "backup" over BackupWorkspaceInitializer :<itemizedlist>
+ <listitem>
+ <para>Stop repository (will be skipped this step if workspace is
+ not exists)</para>
+ </listitem>
+
+ <listitem>
+ <para>Clean database, value storage, index; (will be skipped
+ this step if workspace is new)</para>
+ </listitem>
+
+ <listitem>
+ <para>In configuration, the workspace/-s set
+ BackupWorkspaceInitializer to refer to your
+ backup<programlisting><workspaces>
+ <workspace name="backup" ... >
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ ...
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.BackupWorkspaceInitializer">
+ <properties>
+ <property name="restore-path" value="D:\java\exo-working\backup\repository_backup-20110120_044734"/>
+ </properties>
+ </initializer>
+ ...
+</workspace></programlisting></para>
+ </listitem>
+
+ <listitem>
+ <para>Start repository</para>
+ </listitem>
+ </itemizedlist></para>
+ </section>
+
+ <section>
+ <title>Restore the Repository over BackupWorksaceInitializer</title>
+
+ <para>Example of configuration initializers to restore the repository
+ "repository" over BackupWorkspaceInitializer : <itemizedlist>
+ <listitem>
+ <para>Stop repository (will be skipped this step if repository
+ is not exists)</para>
+ </listitem>
+
+ <listitem>
+ <para>Clean database, value storage, index; (will be skipped
+ this step if repository is new)</para>
+ </listitem>
+
+ <listitem>
+ <para>In configuration of repository will be configured
+ initializers of workspace to refer to your backup.</para>
+
+ <para>For example :<programlisting>...
+<workspaces>
+ <workspace name="system" ... >
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ ...
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.BackupWorkspaceInitializer">
+ <properties>
+ <property name="restore-path" value="D:\java\exo-working\backup\repository_system-20110120_052334"/>
+ </properties>
+ </initializer>
+ ...
+ </workspace>
+
+ <workspace name="collaboration" ... >
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ ...
+ </container>
+ <initializer class="org.exoplatform.services.jcr.impl.core.BackupWorkspaceInitializer">
+ <properties>
+ <property name="restore-path" value="D:\java\exo-working\backup\repository_collaboration-20110120_052341"/>
+ </properties>
+ </initializer>
+ ...
+ </workspace>
+
+ <workspace name="backup" ... >
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ ...
+ </container>
+
+ <initializer class="org.exoplatform.services.jcr.impl.core.BackupWorkspaceInitializer">
+ <properties>
+ <property name="restore-path" value="D:\java\exo-working\backup\repository_backup-20110120_052417"/>
+ </properties>
+ </initializer>
+ ...
+ </workspace>
+</workspaces></programlisting></para>
+ </listitem>
+
+ <listitem>
+ <para>Start repository.</para>
+ </listitem>
+ </itemizedlist></para>
+ </section>
+ </section>
</section>
<section>
13 years, 3 months
exo-jcr SVN: r3898 - in jcr/trunk: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms and 7 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-01-28 05:28:29 -0500 (Fri, 28 Jan 2011)
New Revision: 3898
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JdbcBackupable.java
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/Backupable.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestor.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedRepositoryRestoreSameConfig.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedWorkspaceRestoreSameConfig.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/RdbmsWorkspaceInitializer.java
Log:
EXOJCR-1078: avoid using Connection as parameter for getDataRestorer() method
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/Backupable.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/Backupable.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/Backupable.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -19,7 +19,6 @@
package org.exoplatform.services.jcr.impl.backup;
import java.io.File;
-import java.sql.Connection;
/**
* @author <a href="mailto:anatoliy.bazko@gmail.com">Anatoliy Bazko</a>
@@ -50,11 +49,9 @@
*
* @param storageDir
* the directory where backup is stored
- * @param jdbcConn
- * the shared connection to database if need, may be null
* @throws RestoreException
* if any exception occurred
*/
- DataRestor getDataRestorer(File storageDir, Connection jdbcConn) throws BackupException;
+ DataRestor getDataRestorer(File storageDir) throws BackupException;
}
Added: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JdbcBackupable.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JdbcBackupable.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/JdbcBackupable.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.backup;
+
+import java.io.File;
+import java.sql.Connection;
+
+/**
+ * @author <a href="mailto:anatoliy.bazko@gmail.com">Anatoliy Bazko</a>
+ * @version $Id: Backupable.java 34360 2009-07-22 23:58:59Z tolusha $
+ */
+public interface JdbcBackupable extends Backupable
+{
+
+ /**
+ * Get data restorer to support atomic restore.
+ *
+ * @param storageDir
+ * the directory where backup is stored
+ * @param jdbcConn
+ * the connection to database
+ * @throws RestoreException
+ * if any exception occurred
+ */
+ DataRestor getDataRestorer(File storageDir, Connection jdbcConn) throws BackupException;
+
+}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestor.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestor.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -20,7 +20,6 @@
import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
-import org.exoplatform.commons.utils.SecurityHelper;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
import org.exoplatform.services.jcr.core.security.JCRRuntimePermissions;
@@ -43,7 +42,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.security.PrivilegedExceptionAction;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -55,10 +53,7 @@
import java.util.Map;
import java.util.Map.Entry;
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
-import javax.sql.DataSource;
/**
* Created by The eXo Platform SAS.
@@ -126,31 +121,7 @@
WorkspaceEntry wsConfig, FileCleaner fileCleaner) throws NamingException, SQLException,
RepositoryConfigurationException
{
- String dsName = wsConfig.getContainer().getParameterValue(JDBCWorkspaceDataContainer.SOURCE_NAME);
-
- if (jdbcConn == null)
- {
- final DataSource ds = (DataSource)new InitialContext().lookup(dsName);
- if (ds == null)
- {
- throw new NameNotFoundException("Data source " + dsName + " not found");
- }
-
- this.jdbcConn = SecurityHelper.doPrivilegedSQLExceptionAction(new PrivilegedExceptionAction<Connection>()
- {
- public Connection run() throws Exception
- {
- return ds.getConnection();
-
- }
- });
- this.jdbcConn.setAutoCommit(false);
- }
- else
- {
- this.jdbcConn = jdbcConn;
- }
-
+ this.jdbcConn = jdbcConn;
this.fileCleaner = fileCleaner;
this.maxBufferSize =
wsConfig.getContainer().getParameterInteger(JDBCWorkspaceDataContainer.MAXBUFFERSIZE_PROP,
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -64,7 +64,6 @@
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
-import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
@@ -855,7 +854,7 @@
/**
* {@inheritDoc}
*/
- public DataRestor getDataRestorer(File storageDir, Connection jdbcConn) throws BackupException
+ public DataRestor getDataRestorer(File storageDir) throws BackupException
{
List<LockData> locks = new ArrayList<LockData>();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -76,7 +76,6 @@
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
-import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -1206,7 +1205,7 @@
/**
* {@inheritDoc}}
*/
- public DataRestor getDataRestorer(File storageDir, Connection jdbcConn) throws BackupException
+ public DataRestor getDataRestorer(File storageDir) throws BackupException
{
try
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -54,7 +54,6 @@
import java.io.IOException;
import java.io.Serializable;
import java.security.PrivilegedExceptionAction;
-import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -1155,7 +1154,7 @@
/**
* {@inheritDoc}
*/
- public DataRestor getDataRestorer(File storageDir, Connection jdbcConn) throws BackupException
+ public DataRestor getDataRestorer(File storageDir) throws BackupException
{
return new DataRestor()
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -58,7 +58,6 @@
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
-import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -1581,7 +1580,7 @@
/**
* {@inheritDoc}
*/
- public DataRestor getDataRestorer(File storageDir, Connection jdbcConn) throws BackupException
+ public DataRestor getDataRestorer(File storageDir) throws BackupException
{
return new DataRestor()
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -29,9 +29,9 @@
import org.exoplatform.services.jcr.dataflow.serialization.ObjectWriter;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.backup.BackupException;
-import org.exoplatform.services.jcr.impl.backup.Backupable;
import org.exoplatform.services.jcr.impl.backup.ComplexDataRestor;
import org.exoplatform.services.jcr.impl.backup.DataRestor;
+import org.exoplatform.services.jcr.impl.backup.JdbcBackupable;
import org.exoplatform.services.jcr.impl.backup.rdbms.DBBackup;
import org.exoplatform.services.jcr.impl.backup.rdbms.DBRestor;
import org.exoplatform.services.jcr.impl.backup.rdbms.DirectoryRestor;
@@ -92,7 +92,7 @@
* @author <a href="mailto:peter.nedonosko@exoplatform.com.ua">Peter Nedonosko</a>
* @version $Id:GenericWorkspaceDataContainer.java 13433 2007-03-15 16:07:23Z peterit $
*/
-public class JDBCWorkspaceDataContainer extends WorkspaceDataContainerBase implements Startable, Backupable
+public class JDBCWorkspaceDataContainer extends WorkspaceDataContainerBase implements Startable, JdbcBackupable
{
protected static final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.JDBCWorkspaceDataContainer");
@@ -1379,4 +1379,42 @@
}
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public DataRestor getDataRestorer(File storageDir) throws BackupException
+ {
+ try
+ {
+ final DataSource ds = (DataSource)new InitialContext().lookup(dbSourceName);
+
+ if (ds != null)
+ {
+ Connection jdbcConn =
+ SecurityHelper.doPrivilegedSQLExceptionAction(new PrivilegedExceptionAction<Connection>()
+ {
+ public Connection run() throws Exception
+ {
+ return ds.getConnection();
+ }
+ });
+ jdbcConn.setAutoCommit(false);
+
+ return getDataRestorer(storageDir, jdbcConn);
+ }
+ else
+ {
+ throw new NameNotFoundException("Data source " + dbSourceName + " not found");
+ }
+ }
+ catch (SQLException e)
+ {
+ throw new BackupException(e);
+ }
+ catch (NamingException e)
+ {
+ throw new BackupException(e);
+ }
+ }
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedRepositoryRestoreSameConfig.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedRepositoryRestoreSameConfig.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedRepositoryRestoreSameConfig.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -28,6 +28,7 @@
import org.exoplatform.services.jcr.impl.backup.Backupable;
import org.exoplatform.services.jcr.impl.backup.DataRestor;
import org.exoplatform.services.jcr.impl.backup.JCRRestor;
+import org.exoplatform.services.jcr.impl.backup.JdbcBackupable;
import org.exoplatform.services.jcr.impl.backup.ResumeException;
import org.exoplatform.services.jcr.impl.backup.Suspendable;
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
@@ -132,7 +133,14 @@
for (Backupable component : backupable)
{
- dataRestorer.add(component.getDataRestorer(fullBackupDir, jdbcConn));
+ if (component instanceof JdbcBackupable && jdbcConn != null)
+ {
+ dataRestorer.add(((JdbcBackupable)component).getDataRestorer(fullBackupDir, jdbcConn));
+ }
+ else
+ {
+ dataRestorer.add(component.getDataRestorer(fullBackupDir));
+ }
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedWorkspaceRestoreSameConfig.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedWorkspaceRestoreSameConfig.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/JobExistedWorkspaceRestoreSameConfig.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -96,7 +96,7 @@
for (Backupable component : backupable)
{
File fullBackupDir = JCRRestor.getFullBackupFile(storageDir);
- dataRestorer.add(component.getDataRestorer(fullBackupDir, null));
+ dataRestorer.add(component.getDataRestorer(fullBackupDir));
}
for (DataRestor restorer : dataRestorer)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/RdbmsWorkspaceInitializer.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/RdbmsWorkspaceInitializer.java 2011-01-28 09:45:42 UTC (rev 3897)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/rdbms/RdbmsWorkspaceInitializer.java 2011-01-28 10:28:29 UTC (rev 3898)
@@ -135,7 +135,7 @@
// restore all components
for (Backupable component : backupableComponents)
{
- dataRestorers.add(component.getDataRestorer(new File(restorePath), null));
+ dataRestorers.add(component.getDataRestorer(new File(restorePath)));
}
for (DataRestor restorer : dataRestorers)
13 years, 3 months