<!--

    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="${gatein.jcr.repository.default}">
	<repositories>
		<repository name="${gatein.jcr.repository.default}" system-workspace="${gatein.jcr.workspace.system}" default-workspace="${gatein.jcr.workspace.default}">
			<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="sample-ws">
					<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
						<properties>
							<property name="source-name" value="jdbcexo${container.name.suffix}" />
							<property name="dialect" value="hsqldb" />
							<property name="multi-db" value="false" />
							<property name="update-storage" value="true" />
							<property name="max-buffer-size" value="200k"/>
							<property name="swap-directory" value="../temp/swap/sample-ws${container.name.suffix}" />
                            <property name="trigger-events-for-descendents-on-rename" value="false"/>              
						</properties>
						<value-storages>
							<value-storage id="sample-ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
								<properties>
									<property name="path" value="../temp/values/sample-ws${container.name.suffix}" />
								</properties>
								<filters>
									<filter property-type="Binary" />
								</filters>
							</value-storage>
						</value-storages>
					</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="conf/jcr/jbosscache/${gatein.jcr.config.type}/config.xml" />
              <property name="jgroups-configuration" value="jar:/conf/jcr/jbosscache/cluster/udp-mux.xml" />
              <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="../temp/jcrlucenedb/sample-ws${container.name.suffix}" />
						</properties>
					</query-handler>
					<lock-manager>
						<time-out>15m</time-out><!-- 15min -->
						<persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
							<properties>
								<property name="path" value="../temp/lock/sample-ws${container.name.suffix}" />
							</properties>
						</persister>
					</lock-manager>
				</workspace>
			</workspaces>
		</repository>
	</repositories>
</repository-service>
