<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>
      <workspaces>
        <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" />
              <property name="support-highlighting" value="true" />
              <property name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.DefaultHTMLExcerpt" />
            </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>
