eXo Platform 3.5

## Chapter 20. Workspace Data Container

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 mandatory element container. The type of container is described in the attribute class = fully qualified name of org.exoplatform.services.jcr.storage.WorkspaceDataContainer subclass like

    <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">

      <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"/>

      </properties>

Properties are Container specific parameters:

source-name: JDBC data source name, registered in JDNI by InitialContextInitializer. ( sourceName prior v.1.9)

dialect: Database dialect, one of "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci", "mssql", "sybase", "derby", "db2", "db2v8"

multi-db: Enable multi-database container with this parameter (if "true").

max-buffer-size: A threshold in bytes, if a value size is greater, then it will be spooled to a temporary file.

swap-directory: A location where the value will be spooled if no value storage is configured but a max-buffer-size is exceeded.

lazy-node-iterator-page-size: "Lazy" child nodes iterator settings. Defines size of page, the number of nodes that are retrieved from persistent storage at once.

acl-bloomfilter-false-positive-probability: ACL Bloom-filter settings. ACL Bloom-filter desired false positive probability. Range [0..1]. Default value 0.1d.

acl-bloomfilter-elements-number: ACL Bloom-filter settings. Expected number of ACL-elements in the Bloom-filter. Default value 1000000.

### Note

Bloom filters are not supported by all the cache implementations so far only the inplementation for infinispan supports it.

Bloom-filter used to avoid read nodes that definitely do not have ACL. acl-bloomfilter-false-positive-probability and acl-bloomfilter-elements-number used to configure such filters. Bloom filters are not supported by all the cache implementations so far only the inplementation for infinispan supports it.

More about Bloom filters you can read here http://en.wikipedia.org/wiki/Bloom_filter.

eXo JCR has an RDB (JDBC) based, production ready Workspace Data Container.

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 value-storages. Data Container will try to read or write Value 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 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)).

In a code sample, we use 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's recommended to store properties with large values in a file value storage only.

Copyright © 2009-2012. All rights reserved. eXo Platform SAS