
  <!--

    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.
  -->
<repository-service default-repository="${tenant.repository.name}">
  <repositories>
    <repository name="${tenant.repository.name}" system-workspace="system" default-workspace="collaboration">
      <security-domain>${portal.container.realm}</security-domain>
      <access-control>optional</access-control>
      <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator
      </authentication-policy>

      <!-- PORTAL  -->
      <workspaces>
        <workspace name="system">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/system${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/system${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <workspace name="portal-system">
          <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/portal-system${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/portal-system${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <workspace name="portal-work">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/portal-work${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/portal-work${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <workspace name="wsrp-system">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/wsrp${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true"
            class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/wsrp-system${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <workspace name="pc-system">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/pc${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true"
            class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/pc-system${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <!-- ECM (DMS+WCM) -->
        <workspace name="collaboration">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/collaboration${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true"
            class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/collaboration${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <workspace name="backup">
          <container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/backup${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/backup${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <workspace name="dms-system">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/dms-system${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true"
            class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/dms-system${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <workspace name="wcm-system">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/wcm-system${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/wcm-system${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <!-- SOCIAL  -->
        <workspace name="social">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="auto" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/social${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/social${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <!--  KS -->
        <workspace name="knowledge">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/knowledge${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
            </properties>
          </initializer>
          <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/knowledge${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>

        <!-- IDE -->
        <workspace name="dev-monit">
          <container
            class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
            <properties>
              <property name="source-name" value="${tenant.repository.name}" />
              <property name="dialect" value="${gatein.jcr.datasource.dialect}" />
              <property name="multi-db" value="false" />
              <property name="update-storage" value="true" />
              <property name="max-buffer-size" value="200k" />
              <property name="swap-directory" value="${gatein.jcr.data.dir}/${tenant.repository.name}/swap/dev-monit${container.name.suffix}" />
            </properties>
          </container>
          <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
            <properties>
              <property name="root-nodetype" value="nt:unstructured" />
              <property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove;*:/developers read;*:/developers add_node;*:/developers set_property;*:/developers remove" />
            </properties>
          </initializer>
          <cache enabled="true"
            class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
            <properties>
              <property name="jbosscache-configuration" value="${gatein.jcr.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-cache${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="jbosscache-expiration-time" value="${gatein.jcr.cache.expiration.time}" />
            </properties>
          </cache>
          <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <properties>
              <property name="index-dir" value="${gatein.jcr.data.dir}/${tenant.repository.name}/index/dev-monit${container.name.suffix}" />
              <property name="changesfilter-class" value="${gatein.jcr.index.changefilterclass}" />
              <property name="jbosscache-configuration" value="${gatein.jcr.index.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-indexer${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <property name="max-volatile-time" value="60" />
            </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="${gatein.jcr.lock.cache.config}" />
              <property name="jgroups-configuration" value="${gatein.jcr.jgroups.config}" />
              <property name="jbosscache-cluster-name" value="jcr-lock${container.name.suffix}" />
              <property name="jbosscache-shareable" value="true" />
              <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="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="${tenant.repository.name}" />
            </properties>
          </lock-manager>
        </workspace>
      </workspaces>
    </repository>
  </repositories>
</repository-service>
