[exo-jcr-commits] exo-jcr SVN: r5980 - jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Mar 28 07:12:31 EDT 2012
Author: dkuleshov
Date: 2012-03-28 07:12:31 -0400 (Wed, 28 Mar 2012)
New Revision: 5980
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml
Log:
EXOJCR-1807: updated Workspace Data Container and JDB?\208?\161 Workspace Data Container documentation, removed unnecessary parts.
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2012-03-28 11:02:43 UTC (rev 5979)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/exo-jcr-configuration.xml 2012-03-28 11:12:31 UTC (rev 5980)
@@ -240,61 +240,6 @@
permissions and other users have only a 'read' permission.</para>
</section>
- <section>
- <title>Workspace data container configuration:</title>
-
- <para><emphasis role="bold">class:</emphasis> A workspace data container
- class name.</para>
-
- <para><emphasis role="bold">properties</emphasis>: The list of properties
- (name-value pairs) for the concrete Workspace data container.</para>
-
- <table>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>trigger_events_for_descendents_on_rename</entry>
-
- <entry>indicates if need to trigger events for descendents on
- rename or not. It allows to increase performance on rename
- operation but in same time Observation'll not notified, has
- default value true</entry>
- </row>
-
- <row>
- <entry>lazy-node-iterator-page-size</entry>
-
- <entry>the page size for lazy iterator. Indicates how many nodes
- can be retrieved from storage per request. The default value is
- 100</entry>
- </row>
-
- <row>
- <entry>acl-bloomfilter-false-positive-probability</entry>
-
- <entry>ACL Bloom-filter desired false positive probability. Range
- [0..1]. Default value 0.1d. (See the note below)</entry>
- </row>
-
- <row>
- <entry>acl-bloomfilter-elements-number</entry>
-
- <entry>Expected number of ACL-elements in the Bloom-filter.
- Default value 1000000. (See the note below)</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <note>
- <para>Bloom filters are not supported by all the cache implementations
- so far only the inplementation for infinispan supports it.</para>
- </note>
-
- <para><emphasis role="bold">value-storages</emphasis>: The list of value
- storage plugins.</para>
- </section>
-
<section id="JCR.ConfigurationPersister.ValueStoragePlugin">
<title>Value Storage plugin configuration (for data container):</title>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2012-03-28 11:02:43 UTC (rev 5979)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/jdbc-data-container-config.xml 2012-03-28 11:12:31 UTC (rev 5980)
@@ -7,244 +7,244 @@
<title>JDBC Data Container Config</title>
<para>eXo JCR persistent data container can work in two configuration
- modes:<itemizedlist>
- <listitem>
- <para><phrase>Multi-database</phrase>: One database for each
- workspace (used in standalone eXo JCR service mode)</para>
- </listitem>
+ modes:<itemizedlist>
+ <listitem>
+ <para><phrase>Multi-database</phrase>: One database for each workspace
+ (used in standalone eXo JCR service mode)</para>
+ </listitem>
- <listitem>
- <para><phrase>Single-database</phrase>: All workspaces persisted in
- one database (used in embedded eXo JCR service mode, e.g. in eXo
- portal)</para>
- </listitem>
- </itemizedlist></para>
+ <listitem>
+ <para><phrase>Single-database</phrase>: All workspaces persisted in
+ one database (used in embedded eXo JCR service mode, e.g. in eXo
+ portal)</para>
+ </listitem>
+ </itemizedlist></para>
- <para>The data container uses the JDBC driver to communicate with the
- actual database software, i.e. any JDBC-enabled data storage can be used
- with eXo JCR implementation.</para>
+ <para>The data container uses the JDBC driver to communicate with the actual
+ database software, i.e. any JDBC-enabled data storage can be used with eXo
+ JCR implementation.</para>
- <para>Currently the data container is tested with the following
- configurations:<itemizedlist>
- <listitem>
- <para>MySQL 5.0.18 MYSQL Connector/J 5.0.8</para>
- </listitem>
+ <para>Currently the data container is tested with the following
+ configurations:<itemizedlist>
+ <listitem>
+ <para>MySQL 5.0.18 MYSQL Connector/J 5.0.8</para>
+ </listitem>
- <listitem>
- <para>MySQL 5.1.36 MYSQL Connector/J 5.1.14</para>
- </listitem>
+ <listitem>
+ <para>MySQL 5.1.36 MYSQL Connector/J 5.1.14</para>
+ </listitem>
- <listitem>
- <para>PostgresSQL 8.2.4 JDBC4 Driver, Version 8.2-507</para>
- </listitem>
+ <listitem>
+ <para>PostgresSQL 8.2.4 JDBC4 Driver, Version 8.2-507</para>
+ </listitem>
- <listitem>
- <para>PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-606</para>
- </listitem>
+ <listitem>
+ <para>PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-606</para>
+ </listitem>
- <listitem>
- <para>Oracle DB 10g R2 (10.2.0.4), JDBC Driver Oracle 10g R2
- (10.2.0.4)</para>
- </listitem>
+ <listitem>
+ <para>Oracle DB 10g R2 (10.2.0.4), JDBC Driver Oracle 10g R2
+ (10.2.0.4)</para>
+ </listitem>
- <listitem>
- <para>Oracle DB 11g R1 (11.1.0.6.0), JDBC Driver Oracle 11g R1
- (11.1.0.6.0)</para>
- </listitem>
+ <listitem>
+ <para>Oracle DB 11g R1 (11.1.0.6.0), JDBC Driver Oracle 11g R1
+ (11.1.0.6.0)</para>
+ </listitem>
- <listitem>
- <para>Oracle DB 11g R2 (11.2.0.1.0), JDBC Driver Oracle 11g R2
- (11.2.0.1.0)</para>
- </listitem>
+ <listitem>
+ <para>Oracle DB 11g R2 (11.2.0.1.0), JDBC Driver Oracle 11g R2
+ (11.2.0.1.0)</para>
+ </listitem>
- <listitem>
- <para>DB2 9.7.4 IBM Data Server Driver for JDBC and SQLJ (JCC
- Driver) v.9.7</para>
- </listitem>
+ <listitem>
+ <para>DB2 9.7.4 IBM Data Server Driver for JDBC and SQLJ (JCC Driver)
+ v.9.7</para>
+ </listitem>
- <listitem>
- <para>MS SQL Server 2005 SP3 JDBC Driver 3.0</para>
- </listitem>
+ <listitem>
+ <para>MS SQL Server 2005 SP3 JDBC Driver 3.0</para>
+ </listitem>
- <listitem>
- <para>MS SQL Server 2008 JDBC Driver 3.0</para>
- </listitem>
+ <listitem>
+ <para>MS SQL Server 2008 JDBC Driver 3.0</para>
+ </listitem>
- <listitem>
- <para>Sybase 15.0.3 ASE Driver: Sybase jConnect JDBC driver v7
- (Build 26502)</para>
- </listitem>
+ <listitem>
+ <para>Sybase 15.0.3 ASE Driver: Sybase jConnect JDBC driver v7 (Build
+ 26502)</para>
+ </listitem>
- <listitem>
- <para>HSQLDB (2.0.0)</para>
- </listitem>
- </itemizedlist></para>
+ <listitem>
+ <para>HSQLDB (2.0.0)</para>
+ </listitem>
+ </itemizedlist></para>
- <para>Each database software supports ANSI SQL standards but also has its
- own specifics. So, each database has its own configuration in eXo JCR as a
- database dialect parameter. If you need a more detailed configuration of
- the database, it's possible to do that by editing the metadata SQL-script
- files.</para>
+ <para>Each database software supports ANSI SQL standards but also has its
+ own specifics. So, each database has its own configuration in eXo JCR as a
+ database dialect parameter. If you need a more detailed configuration of the
+ database, it's possible to do that by editing the metadata SQL-script
+ files.</para>
- <para>SQL-scripts you can obtain from jar-file
- exo.jcr.component.core-XXX.XXX.jar:conf/storage/. They also can be found
- at SVN <ulink
- url="https://anonsvn.jboss.org/repos/exo-jcr/jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/">here.</ulink></para>
+ <para>SQL-scripts you can obtain from jar-file
+ exo.jcr.component.core-XXX.XXX.jar:conf/storage/. They also can be found at
+ SVN <ulink
+ url="https://anonsvn.jboss.org/repos/exo-jcr/jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/">here.</ulink></para>
- <para>In the next two tables correspondence between the scripts and
- databases is shown.</para>
+ <para>In the next two tables correspondence between the scripts and
+ databases is shown.</para>
- <table border="1">
- <caption>Single-database</caption>
+ <table border="1">
+ <caption>Single-database</caption>
- <tr>
- <td>MySQL DB</td>
+ <tr>
+ <td>MySQL DB</td>
- <td>jcr-sjdbc.mysql.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with utf-8</td>
+ <tr>
+ <td>MySQL DB with utf-8</td>
- <td>jcr-sjdbc.mysql-utf8.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql-utf8.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM*</td>
+ <tr>
+ <td>MySQL DB with MyISAM*</td>
- <td>jcr-sjdbc.mysql-myisam.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql-myisam.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM and utf-8*</td>
+ <tr>
+ <td>MySQL DB with MyISAM and utf-8*</td>
- <td>jcr-sjdbc.mysql-myisam-utf8.sql</td>
- </tr>
+ <td>jcr-sjdbc.mysql-myisam-utf8.sql</td>
+ </tr>
- <tr>
- <td>PostgresSQL</td>
+ <tr>
+ <td>PostgresSQL</td>
- <td>jcr-sjdbc.pqsql.sql</td>
- </tr>
+ <td>jcr-sjdbc.pqsql.sql</td>
+ </tr>
- <tr>
- <td>Oracle DB</td>
+ <tr>
+ <td>Oracle DB</td>
- <td>jcr-sjdbc.ora.sql</td>
- </tr>
+ <td>jcr-sjdbc.ora.sql</td>
+ </tr>
- <tr>
- <td>DB2</td>
+ <tr>
+ <td>DB2</td>
- <td>jcr-sjdbc.db2.sql</td>
- </tr>
+ <td>jcr-sjdbc.db2.sql</td>
+ </tr>
- <tr>
- <td>MS SQL Server</td>
+ <tr>
+ <td>MS SQL Server</td>
- <td>jcr-sjdbc.mssql.sql</td>
- </tr>
+ <td>jcr-sjdbc.mssql.sql</td>
+ </tr>
- <tr>
- <td>Sybase</td>
+ <tr>
+ <td>Sybase</td>
- <td>jcr-sjdbc.sybase.sql</td>
- </tr>
+ <td>jcr-sjdbc.sybase.sql</td>
+ </tr>
- <tr>
- <td>HSQLDB</td>
+ <tr>
+ <td>HSQLDB</td>
- <td>jcr-sjdbc.sql</td>
- </tr>
- </table>
+ <td>jcr-sjdbc.sql</td>
+ </tr>
+ </table>
- <table border="1">
- <caption>Multi-database</caption>
+ <table border="1">
+ <caption>Multi-database</caption>
- <tr>
- <td>MySQL DB</td>
+ <tr>
+ <td>MySQL DB</td>
- <td>jcr-mjdbc.mysql.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with utf-8</td>
+ <tr>
+ <td>MySQL DB with utf-8</td>
- <td>jcr-mjdbc.mysql-utf8.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql-utf8.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM*</td>
+ <tr>
+ <td>MySQL DB with MyISAM*</td>
- <td>jcr-mjdbc.mysql-myisam.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql-myisam.sql</td>
+ </tr>
- <tr>
- <td>MySQL DB with MyISAM and utf-8*</td>
+ <tr>
+ <td>MySQL DB with MyISAM and utf-8*</td>
- <td>jcr-mjdbc.mysql-myisam-utf8.sql</td>
- </tr>
+ <td>jcr-mjdbc.mysql-myisam-utf8.sql</td>
+ </tr>
- <tr>
- <td>PostgresSQL</td>
+ <tr>
+ <td>PostgresSQL</td>
- <td>jcr-mjdbc.pqsql.sql</td>
- </tr>
+ <td>jcr-mjdbc.pqsql.sql</td>
+ </tr>
- <tr>
- <td>Oracle DB</td>
+ <tr>
+ <td>Oracle DB</td>
- <td>jcr-mjdbc.ora.sql</td>
- </tr>
+ <td>jcr-mjdbc.ora.sql</td>
+ </tr>
- <tr>
- <td>DB2</td>
+ <tr>
+ <td>DB2</td>
- <td>jcr-mjdbc.db2.sql</td>
- </tr>
+ <td>jcr-mjdbc.db2.sql</td>
+ </tr>
- <tr>
- <td>MS SQL Server</td>
+ <tr>
+ <td>MS SQL Server</td>
- <td>jcr-mjdbc.mssql.sql</td>
- </tr>
+ <td>jcr-mjdbc.mssql.sql</td>
+ </tr>
- <tr>
- <td>Sybase</td>
+ <tr>
+ <td>Sybase</td>
- <td>jcr-mjdbc.sybase.sql</td>
- </tr>
+ <td>jcr-mjdbc.sybase.sql</td>
+ </tr>
- <tr>
- <td>HSQLDB</td>
+ <tr>
+ <td>HSQLDB</td>
- <td>jcr-mjdbc.sql</td>
- </tr>
- </table>
+ <td>jcr-mjdbc.sql</td>
+ </tr>
+ </table>
- <para>In case the non-ANSI node name is used, it's necessary to use a
- database with MultiLanguage support[TODO link to MultiLanguage]. Some JDBC
- drivers need additional parameters for establishing a Unicode friendly
- connection. E.g. under mysql it's necessary to add an additional parameter
- for the JDBC driver at the end of JDBC URL. For instance:
- <code>jdbc:mysql://exoua.dnsalias.net/portal?characterEncoding=utf8</code></para>
+ <para>In case the non-ANSI node name is used, it's necessary to use a
+ database with MultiLanguage support[TODO link to MultiLanguage]. Some JDBC
+ drivers need additional parameters for establishing a Unicode friendly
+ connection. E.g. under mysql it's necessary to add an additional parameter
+ for the JDBC driver at the end of JDBC URL. For instance:
+ <code>jdbc:mysql://exoua.dnsalias.net/portal?characterEncoding=utf8</code></para>
- <para>There are preconfigured configuration files for HSQLDB. Look for
- these files in /conf/portal and /conf/standalone folders of the jar-file
- <package>exo.jcr.component.core-XXX.XXX.jar</package> or
- source-distribution of eXo JCR implementation.</para>
+ <para>There are preconfigured configuration files for HSQLDB. Look for these
+ files in /conf/portal and /conf/standalone folders of the jar-file
+ <package>exo.jcr.component.core-XXX.XXX.jar</package> or source-distribution
+ of eXo JCR implementation.</para>
- <para>By default, the configuration files are located in service jars
- <filename>/conf/portal/configuration.xml</filename> (eXo services
- including JCR Repository Service) and
- <filename>exo-jcr-config.xml</filename> (repositories configuration). In
- eXo portal product, JCR is configured in portal web application
- <filename>portal/WEB-INF/conf/jcr/jcr-configuration.xml</filename> (JCR
- Repository Service and related serivces) and repository-configuration.xml
- (repositories configuration).</para>
+ <para>By default, the configuration files are located in service jars
+ <filename>/conf/portal/configuration.xml</filename> (eXo services including
+ JCR Repository Service) and <filename>exo-jcr-config.xml</filename>
+ (repositories configuration). In eXo portal product, JCR is configured in
+ portal web application
+ <filename>portal/WEB-INF/conf/jcr/jcr-configuration.xml</filename> (JCR
+ Repository Service and related serivces) and repository-configuration.xml
+ (repositories configuration).</para>
- <para>Read more about <link linkend="JCR.eXoJCRconfiguration">Repository
- configuration</link>.</para>
+ <para>Read more about <link linkend="JCR.eXoJCRconfiguration">Repository
+ configuration</link>.</para>
<section>
<title>General recommendations for database configuration</title>
@@ -410,90 +410,47 @@
</section>
<section>
- <title>Multi-database Configuration</title>
+ <title>Isolated-database Configuration</title>
- <para>You need to configure each workspace in a repository. You may have
- each one on different remote servers as far as you need.</para>
-
- <para>First of all configure the data containers in the
+ <para>Isolated-database configuration allows to configure single database
+ for repository but separate database tables for each workspace. First step
+ is to configure the data container in the
<classname>org.exoplatform.services.naming.InitialContextInitializer</classname>
- service. It's the JNDI context initializer which registers (binds) naming
+ service. It's the JNDI context initializer, which registers (binds) naming
resources (DataSources) for data containers.</para>
- <para>For example (standalone mode, two data containers
- <parameter>jdbcjcr</parameter> - local HSQLDB,
- <parameter>jdbcjcr1</parameter> - remote MySQL):</para>
+ <para>For example:</para>
- <programlisting language="xml"><component>
- <key>org.exoplatform.services.naming.InitialContextInitializer</key>
- <type>org.exoplatform.services.naming.InitialContextInitializer</type>
- <component-plugins>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
+ <programlisting language="xml"> <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
<properties-param>
<name>ref-addresses</name>
<description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://exoua.dnsalias.net/jcr"/>
+ <property name="driverClassName" value="org.postgresql.Driver"/>
+ <property name="url" value="jdbc:postgresql://exoua.dnsalias.net/portal"/>
<property name="username" value="exoadmin"/>
<property name="password" value="exo12321"/>
- <property name="maxActive" value="50"/>
- <property name="maxIdle" value="5"/>
- <property name="initialSize" value="5"/>
</properties-param>
- </init-params>
- </component-plugin>
- <component-plugins>
- <init-params>
- <value-param>
- <name>default-context-factory</name>
- <value>org.exoplatform.services.naming.SimpleContextFactory</value>
- </value-param>
- </init-params>
- </component>
- </programlisting>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins></programlisting>
<para>We configure the database connection parameters:<itemizedlist>
<listitem>
@@ -517,146 +474,41 @@
</listitem>
</itemizedlist></para>
- <para>There can be connection pool configuration parameters
- (org.apache.commons.dbcp.BasicDataSourceFactory):<itemizedlist>
- <listitem>
- <para><parameter>maxActive</parameter>, e.g. 50</para>
- </listitem>
-
- <listitem>
- <para><parameter>maxIdle</parameter>, e.g. 5</para>
- </listitem>
-
- <listitem>
- <para><parameter>initialSize</parameter>, e.g. 5</para>
- </listitem>
-
- <listitem>
- <para>and other according to <ulink
- url="http://jakarta.apache.org/commons/dbcp/configuration.html">Apache
- DBCP configuration</ulink></para>
- </listitem>
- </itemizedlist></para>
-
<para>When the data container configuration is done, we can configure the
- repository service. Each workspace will be configured for its own data
+ repository service. Each workspace will be configured for the same data
container.</para>
- <para>For example (two workspaces <parameter>ws</parameter> - jdbcjcr,
- <parameter>ws1</parameter> - jdbcjcr1):</para>
+ <para>For example:</para>
<programlisting language="xml"><workspaces>
- <workspace name="ws">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr"/>
- <property name="dialect" value="hsqldb"/>
- <property name="multi-db" value="true"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws"/>
- </properties>
- </container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/><!-- 10Kbytes -->
- <property name="live-time" value="30m"/><!-- 30 min -->
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <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_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-shareable" value="true" />
- </properties>
- </lock-manager>
- </workspace>
+ <workspace name="ws">
+ <!-- for system storage -->
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="db-structure-type" value="isolated" />
+ ...
+ </properties>
+ ...
+ </container>
+ ...
+ </workspace>
- <workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr1"/>
- <property name="dialect" value="mysql"/>
- <property name="multi-db" value="true"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws1"/>
- </properties>
- </container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/>
- <property name="live-time" value="5m"/>
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="target/temp/index"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <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_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-shareable" value="true" />
- </properties>
- </lock-manager>
- </workspace>
-</workspaces>
-</programlisting>
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr" />
+ <property name="db-structure-type" value="isolated" />
+ ...
+ </properties>
+ ...
+ </container>
+ ...
+ </workspace>
+</workspaces></programlisting>
- <itemizedlist>
- <listitem>
- <para><parameter>source-name</parameter>: A javax.sql.DataSource name
- configured in InitialContextInitializer component (was
- <parameter>sourceName</parameter> prior JCR 1.9);</para>
- </listitem>
-
- <listitem>
- <para><parameter>dialect</parameter>: A database dialect, one of
- "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci",
- "mssql", "sybase", "derby", "db2", "db2v8" or "auto" for dialect
- autodetection;</para>
- </listitem>
-
- <listitem>
- <para><parameter>multi-db</parameter>: Enable multi-database container
- with this parameter (set value "true");</para>
- </listitem>
-
- <listitem>
- <para><parameter>max-buffer-size: A</parameter> a threshold (in bytes)
- after which a javax.jcr.Value content will be swapped to a file in a
- temporary storage. I.e. swap for pending changes.</para>
- </listitem>
-
- <listitem>
- <para><parameter>swap-directory</parameter>: A path in the file system
- used to swap the pending changes.</para>
- </listitem>
- </itemizedlist>
-
<para>In this way, we have configured two workspace which will be
- persisted in two different databases (ws in HSQLDB, ws1 in MySQL).</para>
+ persisted in different database tables.</para>
<note>
<para>Starting from v.1.9 <link
@@ -667,13 +519,129 @@
</section>
<section>
+ <title>Multi-database Configuration</title>
+
+ <note>
+ <para>This configuration option is now deprecated. Use isolated database
+ configuration instead.</para>
+ </note>
+
+ <para>You need to configure each workspace in a repository. You may have
+ each one on different remote servers as far as you need.</para>
+
+ <para>First of all configure the data containers in the
+ <classname>org.exoplatform.services.naming.InitialContextInitializer</classname>
+ service. It's the JNDI context initializer which registers (binds) naming
+ resources (DataSources) for data containers.</para>
+
+ <para>For example:</para>
+
+ <programlisting language="xml"><component>
+ <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+ <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+ <component-plugins>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+ <property name="url" value="jdbc:mysql://exoua.dnsalias.net/jcr"/>
+ <property name="username" value="exoadmin"/>
+ <property name="password" value="exo12321"/>
+ <property name="maxActive" value="50"/>
+ <property name="maxIdle" value="5"/>
+ <property name="initialSize" value="5"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugins>
+</component>
+ </programlisting>
+
+ <para>When the data container configuration is done, we can configure the
+ repository service. Each workspace will be configured for its own data
+ container.</para>
+
+ <para>For example:</para>
+
+ <programlisting language="xml"><workspaces>
+ <workspace name="ws">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr"/>
+ <property name="db-structure-type" value="multi"/>
+ ...
+ </properties>
+ </container>
+ ...
+ </workspace>
+
+ <workspace name="ws1">
+ <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <properties>
+ <property name="source-name" value="jdbcjcr1"/>
+ <property name="db-structure-type" value="multi"/>
+ ...
+ </properties>
+ </container>
+ ...
+ </workspace>
+</workspaces> </programlisting>
+
+ <para>In this way, we have configured two workspace which will be
+ persisted in two different databases (ws in HSQLDB, ws1 in MySQL).</para>
+ </section>
+
+ <section>
<title>Single-database configuration</title>
- <para>It's more simple to configure a single-database data container. We
- have to configure one naming resource.</para>
+ <para>It's simplier to configure a single-database data container. We have
+ to configure one naming resource.</para>
- <para>For example (embedded mode for <parameter>jdbcjcr</parameter> data
- container):</para>
+ <para>For example:</para>
<programlisting language="xml"><external-component-plugins>
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
@@ -711,129 +679,37 @@
</programlisting>
<para>And configure repository workspaces in repositories configuration
- with this one database. Parameter "multi-db" must be switched off (set
- value "false").</para>
+ with this one database.</para>
- <para>For example (two workspaces <parameter>ws</parameter> - jdbcjcr,
- <parameter>ws1</parameter> - jdbcjcr):</para>
+ <para>For example:</para>
<programlisting language="xml"><workspaces>
<workspace name="ws">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcjcr"/>
- <property name="dialect" value="pgsql"/>
- <property name="multi-db" value="false"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws"/>
- </properties>
+ <properties>
+ <property name="source-name" value="jdbcjcr"/>
+ <property name="db-structure-type" value="single" />
+ ...
+ </properties>
</container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/>
- <property name="live-time" value="30m"/>
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="../temp/index"/>
- </properties>
- </query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <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_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-shareable" value="true" />
- </properties>
- </lock-manager>
+ ...
</workspace>
+
<workspace name="ws1">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr"/>
- <property name="dialect" value="pgsql"/>
- <property name="multi-db" value="false"/>
- <property name="max-buffer-size" value="200K"/>
- <property name="swap-directory" value="target/temp/swap/ws1"/>
+ <property name="db-structure-type" value="single" />
+ ...
</properties>
- </container>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="10K"/>
- <property name="live-time" value="5m"/>
- </properties>
- </cache>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="jbosscache-lock.xml" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks" />
- <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_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-shareable" value="true" />
- </properties>
- </lock-manager>
+ ...
</workspace>
-</workspaces>
-</programlisting>
+</workspaces></programlisting>
<para>In this way, we have configured two workspaces which will be
persisted in one database (PostgreSQL).</para>
<section>
- <title>Configuration without DataSource</title>
-
- <para>Repository configuration without using of the
- <classname>javax.sql.DataSource</classname> bounded in JNDI.</para>
-
- <para>This case may be usable if you have a dedicated JDBC driver
- implementation with special features like XA transactions,
- statements/connections pooling etc:<itemizedlist>
- <listitem>
- <para>You have to remove the configuration in
- <classname>InitialContextInitializer</classname> for your database
- and configure a new one directly in the workspace
- container.</para>
- </listitem>
-
- <listitem>
- <para>Remove parameter "source-name" and add next lines instead.
- Describe your values for a JDBC driver, database url and
- username.</para>
- </listitem>
- </itemizedlist></para>
-
- <note>
- <para>But be careful in this case JDBC driver should implement and
- provide connection pooling. Connection pooling is very recommended for
- use with JCR to prevent a database overload.</para>
- </note>
-
- <programlisting language="xml"><workspace name="ws">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="dialect" value="hsqldb"/>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal"/>
- <property name="username" value="su"/>
- <property name="password" value=""/>
- ......</programlisting>
- </section>
-
- <section>
<title>Dynamic Workspace Creation</title>
<para>Workspaces can be added dynamically during runtime.</para>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml 2012-03-28 11:02:43 UTC (rev 5979)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/configuration/workspace-persistence-storage.xml 2012-03-28 11:12:31 UTC (rev 5980)
@@ -26,61 +26,125 @@
<property name="lazy-node-iterator-page-size" value="50"/>
<property name="acl-bloomfilter-false-positive-probability" value="0.1d"/>
<property name="acl-bloomfilter-elements-number" value="1000000"/>
+ <property name="check-sns-new-connection" value="false"/>
</properties></programlisting>
- <para>Properties are Container specific parameters:</para>
+ <para><emphasis role="bold">Workspace Data Container specific
+ parameters:</emphasis></para>
- <para><emphasis role="bold">source-name</emphasis>: JDBC data source name,
- registered in JDNI by InitialContextInitializer. ( <emphasis
- role="bold">sourceName</emphasis> prior v.1.9)</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">max-buffer-size</emphasis>: A threshold in
+ bytes, if a value size is greater, then it will be spooled to a
+ temporary file. Default value is 200k.</para>
+ </listitem>
- <para><emphasis role="bold">dialect</emphasis>: Database dialect, one of
- "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci", "mssql",
- "sybase", "derby", "db2", "db2v8"</para>
+ <listitem>
+ <para><emphasis role="bold">swap-directory</emphasis>: A location where
+ the value will be spooled if no value storage is configured but a
+ max-buffer-size is exceeded. Default value is the value of
+ "java.io.tmpdir" system property.</para>
+ </listitem>
- <para><emphasis role="bold">multi-db</emphasis>: Enable multi-database
- container with this parameter (if "true").</para>
+ <listitem>
+ <para><emphasis role="bold">lazy-node-iterator-page-size</emphasis>:
+ "Lazy" child nodes iterator settings. Defines size of page, the number
+ of nodes that are retrieved from persistent storage at once. Default
+ value is 100.</para>
+ </listitem>
- <para><emphasis role="bold">max-buffer-size</emphasis>: A threshold in
- bytes, if a value size is greater, then it will be spooled to a temporary
- file.</para>
+ <listitem>
+ <para><emphasis
+ role="bold">acl-bloomfilter-false-positive-probability</emphasis>: ACL
+ Bloom-filter settings. ACL Bloom-filter desired false positive
+ probability. Range [0..1]. Default value 0.1d.</para>
+ </listitem>
- <para><emphasis role="bold">swap-directory</emphasis>: A location where the
- value will be spooled if no value storage is configured but a
- max-buffer-size is exceeded.</para>
+ <listitem>
+ <para><emphasis role="bold">acl-bloomfilter-elements-number</emphasis>:
+ ACL Bloom-filter settings. Expected number of ACL-elements in the
+ Bloom-filter. Default value 1000000.</para>
+ </listitem>
- <para><emphasis role="bold">lazy-node-iterator-page-size</emphasis>: "Lazy"
- child nodes iterator settings. Defines size of page, the number of nodes
- that are retrieved from persistent storage at once.</para>
+ <listitem>
+ <para><emphasis role="bold">check-sns-new-connection:</emphasis> Defines
+ if we need to create new connection for checking if an older same-name
+ sibling exists. Default value is "false".</para>
+ </listitem>
+ </itemizedlist>
- <para><emphasis
- role="bold">acl-bloomfilter-false-positive-probability</emphasis>: ACL
- Bloom-filter settings. ACL Bloom-filter desired false positive probability.
- Range [0..1]. Default value 0.1d.</para>
-
- <para><emphasis role="bold">acl-bloomfilter-elements-number</emphasis>: ACL
- Bloom-filter settings. Expected number of ACL-elements in the Bloom-filter.
- Default value 1000000.</para>
-
<note>
<para>Bloom filters are not supported by all the cache implementations so
- far only the inplementation for infinispan supports it.</para>
-
- <para>Bloom-filter used to avoid read nodes that definitely do not have
- ACL. <emphasis
+ far only the inplementation for infinispan supports it. They are used to
+ avoid read nodes that definitely do not have ACL. <emphasis
role="bold">acl-bloomfilter-false-positive-probability</emphasis> and
<emphasis role="bold">acl-bloomfilter-elements-number</emphasis> used to
- configure such filters. Bloom filters are not supported by all the cache
- implementations so far only the inplementation for infinispan supports
- it.</para>
-
- <para>More about Bloom filters you can read here <ulink
- url="http://en.wikipedia.org/wiki/Bloom_filter">http://en.wikipedia.org/wiki/Bloom_filter</ulink>.</para>
+ configure such filters.More about Bloom filters you can read <ulink
+ url="http://en.wikipedia.org/wiki/Bloom_filter" >http://en.wikipedia.org/wiki/Bloom_filter">here</ulink>.</para>
</note>
<para>eXo JCR has an RDB (JDBC) based, production ready <emphasis
role="bold">Workspace Data Container</emphasis>.</para>
+ <para><emphasis role="bold">JDBC Workspace Data Container specific
+ parameters:</emphasis></para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">source-name</emphasis>: JDBC data source
+ name, registered in JDNI by InitialContextInitializer. ( <emphasis
+ role="bold">sourceName</emphasis> prior v.1.9). This property is
+ <emphasis role="bold">mandatory</emphasis>.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">dialect</emphasis>: Database dialect, one of
+ "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci",
+ "mssql", "sybase", "derby", "db2", "db2v8". The default value is
+ "auto".</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">multi-db</emphasis>: Enable multi-database
+ container with this parameter (if "true"). Otherwise (if "false")
+ configured for single-database container. Please, be aware, that this
+ property is currently <emphasis role="bold">deprecated</emphasis>. It is
+ advised to use <emphasis>db-structure-type</emphasis> instead.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">db-structure-type</emphasis>: Can be set to
+ <emphasis>isolated, multi, single</emphasis> to set corresponding
+ configuration for data container. This property is <emphasis
+ role="bold">mandatory.</emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">db-tablename-suffix:</emphasis> If
+ <emphasis>db-structure-type </emphasis>is set to
+ <emphasis>isolated</emphasis>, tables, used by repository service, have
+ the following format:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>JCR_I${db-tablename-suffix} - for items</para>
+ </listitem>
+
+ <listitem>
+ <para>JCR_V${db-tablename-suffix} - for values</para>
+ </listitem>
+
+ <listitem>
+ <para>JCR_R${db-tablename-suffix} - for references</para>
+
+ <para><emphasis>db-tablename-suffix</emphasis> by default equals to
+ workspace name, but can be set via configuration to any
+ suitable.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+
<para>Workspace Data Container MAY support external storages for
javax.jcr.Value (which can be the case for BLOB values for example) using
the optional element <emphasis role="bold">value-storages</emphasis>. Data
More information about the exo-jcr-commits
mailing list