You are looking at documentation for an older release. Not what you want? See the current release documentation.
Each Workspace of JCR has its own persistent storage to hold
workspace's items data. eXo Content Repository can be configured so that it
can use one or more workspaces that are logical units of the repository
content. Physical data storage mechanism is configured using the container
mandatory
element. The type of container is
described in the class
attribute = the fully
qualified name of
the org.exoplatform.services.jcr.storage.WorkspaceDataContainer
subclass
like:
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr1"/>
<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"/>
<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"/>
<property name="batch-size" value="1000"/>
</properties>
Specific parameters of Workspace Data Container
max-buffer-size
: A threshold in
bytes, if a value size is greater, then it will be spooled to a
temporary file. The default value is 200k.
swap-directory
: A location where
the value will be spooled if no value storage is configured but a
max-buffer-size
is exceeded. The default value is the value of the
"java.io.tmpdir
" system property.
lazy-node-iterator-page-size
:
"Lazy" child nodes iterator settings. Defines the size of page, the number
of nodes that are retrieved from persistent storage at once. The default
value is 100.
acl-bloomfilter-false-positive-probability
: ACL
Bloom-filter settings. ACL Bloom-filter desired false positive
probability. Range [0..1]. The default value is 0.1d.
acl-bloomfilter-elements-number
:
ACL Bloom-filter settings. Expected number of ACL-elements in the
Bloom-filter. The default value is 1000000.
check-sns-new-connection
: Defines
if you need to create new connection for checking if an older same-name
sibling exists. The default value is "false".
trigger-events-for-descendants-on-rename
: Indicates if each descendant item must be included into the
changes log in case of renaming or not.
If its value is set to "false", the performance on the rename operations will be increased in case of a big amount of nodes under the source parent node. However, the performance will be decreased in case of a small amount of sub-nodes.
If its value is set to "true", the performance will be better in case of a small amount of sub-nodes and worse in case of a big amount of sub-nodes.
If this parameter is not set, the application will rely on the max-descendant-nodes-allowed-on-move parameter to add the descendant items to the changes log or not. If this parameter is not set but the trigger-events-for-descendants-on-move parameter is set, it will have the same value.
trigger-events-for-descendants-on-move: Indicates if each descendant item must be included into the changes log in case of moving or not.
If its value is set to "false", the performance of moving operations will be increased in case of a big amount of nodes under the source parent node. However, the performance will be decreased in case of a small amount of sub-nodes.
If its value is set to "true", the performance will be better in case of a small amount of sub-nodes and worse in case of a big amount of sub-nodes.
If this parameter is not set, the application will rely on the max-descendant-nodes-allowed-on-move parameter to add or not the descendant items to the changes log.
max-descendant-nodes-allowed-on-move: The maximum number of descendant nodes is allowed to be included into the change log. Its value will be then automatically disabled. This allows the best performance regardless of the total amount of sub-nodes. The default value is set to "100". This parameter is used only if trigger-events-for-descendants-on-move and trigger-events-for-descendants-on-rename are not set.
Bloom filters are not supported by all the cache implementations so
far only the implementation for infinispan supports it. They are used to
avoid read nodes that definitely do not have ACL. acl-bloomfilter-false-positive-probability
and
acl-bloomfilter-elements-number
are used to
configure such filters. You can read here
for more information about Bloom filters.
Specific parameters of JDBC Workspace Data Container
eXo JCR has an RDB (JDBC) based production ready Workspace Data Container which has the following specific parameters:
source-name
: JDBC data source
name, registered in JDNI by InitialContextInitializer. (sourceName
prior v.1.9). This property is
mandatory.
dialect
: Database dialect, one of ""hsqldb", "h2", "mysql", "mysql-myisam", "mysql-utf8",
"mysql-myisam-utf8", "pgsql", "pgsql-scs", "oracle", "oracle-oci",
"mssql", "sybase", "derby", "db2", "db2v8". The default value is "auto".
multi-db
: Enables multi-database
containers if the value of this parameter is "true". Otherwise, it is
configured for single-database containers.
This
property is currently deprecated. It is
advised to use
db-structure-type
instead.
db-structure-type
: Can be set to
isolated, multi, single to set corresponding
configuration for data container. This property is mandatory.
db-tablename-suffix
: If
db-structure-type
is set to
isolated, tables used by repository service have
the following format:
JCR_I${db-tablename-suffix}
for items.
JCR_V${db-tablename-suffix}
for values.
JCR_R${db-tablename-suffix}
for references.
db-tablename-suffix
by default equals to the
workspace name, but can be set via configuration to any
suitable.
batch-size
: The batch size. The default value is -1 (disabled).
use-sequence-for-order-number
:
Indicates whether or not a sequence must
be used to manage the order number. The expected value for this parameter is a boolean or "auto".
By default, it is set to "auto" where the value of use-sequence will be set automatically according to your
database type.
It is enabled in case of H2, HSQLDB, PGSQL and ORACLE.
It is disabled in case of MSSQL, MYSQL and SYBASE.
Workspace Data Container may support external storages for
javax.jcr.Value
(which can be the case for BLOB values for example) using
the value-storages
optional element. Data
Container will try to read or write values using underlying value storage
plugin if the filter criteria (see below) match the current property.
<value-storages>
<value-storage id="Storage #1" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="data/values"/>
</properties>
<filters>
<filter property-type="Binary" min-value-size="1M"/><!-- Values large of 1Mbyte -->
</filters>
.........
</value-storages>
Where:
value-storage
is the subclass
of org.exoplatform.services.jcr.storage.value.ValueStoragePlugin
and
properties are optional plugin specific
parameters.
filters
: Each file value storage can
have the filter(s) for incoming values. If there are several filter
criteria, they all have to match (AND-Condition).
A filter can match values by the property type (property-type
), property
name (property-name
), ancestor path (ancestor-path
) and/or the size of
values stored (min-value-size, e.g. 1M, 4.2G, 100 (bytes)).
This code sample uses a filter with property-type
and
min-value-size
only. That means that the storage is only for binary values
whose size is greater than 1Mbyte.
It is recommended to store properties with large values in a file value storage only.
PostgreSQL/PostgrePlus database
PostgreSQL/PostgrePlus's dialect is set automatically. The dialect depends on
the version of database. If you change default value of
standard_conforming_strings
parameter, you must
configure one of the following dialects manually:
PgSQL
: This dialect is used if
standard_conforming_strings
is set to 'off'
which is the default value for version before 9.1.
PgSQL-SCS
: This dialect is used if
standard_conforming_strings
is set to 'on' which is the default value for version after 9.1.
mysql
: This dialect is used if JCR tables
with InnoDB engine (by
default) need to be created.
mysql-utf8
: This dialect is used if JCR
tables with InnoDB engine with UTF-8 encoding support need to be created.
mysql-myisam
: This dialect is used if JCR
tables with MyISAM engine need to be created.
mysql-myisam-utf8
: This dialect is used if
JCR tables with MyISAM engine with UTF-8 encoding support need to be created.
mysql-ndb
: This dialect is used if JCR tables
with NDB engine (mysql cluster) need to be created.
mysql-ndb-utf8
: This dialect is used if JCR tables
with NDB engine (mysql cluster) with UTF-8 encoding support need to be created.
Since MySQL NDB engine does not support foreign keys,
which may lead to improper item removal and as consequence to
InvalidItemStateException
. In this case, you will need to use
consistency checker tool.