You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by cl...@apache.org on 2008/05/05 22:03:45 UTC
svn commit: r653577 - in
/jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources:
applicationContext-jr-jca.xml applicationContext-jr-local.xml
applicationContext-repository.xml jackrabbit-ocm.dtd jcrmapping.xml
repository.xml
Author: clombart
Date: Mon May 5 13:03:45 2008
New Revision: 653577
URL: http://svn.apache.org/viewvc?rev=653577&view=rev
Log:
Update the project to support Spring 2.5 thanks to the contribution made by Padraic Hannon and Sébastien Deleuze (sorry for the delay on this issue) : add config files.
Added:
jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-jca.xml
jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-local.xml
jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-repository.xml
jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jackrabbit-ocm.dtd
jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jcrmapping.xml
jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/repository.xml
Added: jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-jca.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-jca.xml?rev=653577&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-jca.xml (added)
+++ jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-jca.xml Mon May 5 13:03:45 2008
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+ JCA configuration only for JackRabbit. This examples uses Jenks.
+
+ $Id: applicationContext-jr-jca.xml,v 1.1 2005/10/10 09:20:43 costin Exp $
+ -->
+<beans>
+
+ <!-- Transaction manager configuration for Jenks -->
+
+ <bean id="connectionTracker"
+ class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator"/>
+
+ <bean id="transactionManagerImpl"
+ class="org.jencks.factory.TransactionManagerFactoryBean">
+ <property name="defaultTransactionTimeoutSeconds">
+ <value>600</value>
+ </property>
+ <property name="transactionLog">
+ <bean class="org.apache.geronimo.transaction.log.UnrecoverableLog"/>
+ </property>
+ </bean>
+
+ <bean id="transactionContextManager"
+ class="org.jencks.factory.TransactionContextManagerFactoryBean">
+ <property name="transactionManager">
+ <ref local="transactionManagerImpl"/>
+ </property>
+ </bean>
+
+ <bean id="userTransaction"
+ class="org.jencks.factory.UserTransactionFactoryBean">
+ <property name="transactionContextManager">
+ <ref local="transactionContextManager"/>
+ </property>
+ <property name="connectionTrackingCoordinator">
+ <ref local="connectionTracker"/>
+ </property>
+ </bean>
+
+ <bean id="transactionContextInitializer"
+ class="org.jencks.interceptor.TransactionContextInitializer">
+ <property name="associator">
+ <ref local="connectionTracker"/>
+ </property>
+ </bean>
+
+ <!-- JCA configuration -->
+ <bean id="transactionSupport"
+ class="org.jencks.factory.XATransactionFactoryBean">
+ <property name="useTransactionCaching">
+ <value>true</value>
+ </property>
+ <property name="useThreadCaching">
+ <value>false</value>
+ </property>
+ </bean>
+
+ <bean id="poolingSupport" class="org.jencks.factory.SinglePoolFactoryBean">
+ <property name="maxSize">
+ <value>2</value>
+ </property>
+ <property name="minSize">
+ <value>1</value>
+ </property>
+ <property name="blockingTimeoutMilliseconds">
+ <value>60</value>
+ </property>
+ <property name="idleTimeoutMinutes">
+ <value>60</value>
+ </property>
+ <property name="matchOne">
+ <value>true</value>
+ </property>
+ <property name="matchAll">
+ <value>true</value>
+ </property>
+ <property name="selectOneAssumeMatch">
+ <value>true</value>
+ </property>
+ </bean>
+
+ <bean id="connectionManager"
+ class="org.jencks.factory.ConnectionManagerFactoryBean">
+ <property name="transactionSupport">
+ <ref local="transactionSupport"/>
+ </property>
+ <property name="poolingSupport">
+ <ref local="poolingSupport"/>
+ </property>
+ <property name="transactionContextManager">
+ <ref local="transactionContextManager"/>
+ </property>
+ <property name="connectionTracker">
+ <ref local="connectionTracker"/>
+ </property>
+ </bean>
+
+ <!-- JackRabbit JCA specific configuration -->
+ <bean id="repositoryManagedConnectionFactory"
+ class="org.apache.jackrabbit.jca.JCAManagedConnectionFactory">
+ <property name="homeDir">
+ <value>./xa-rep</value>
+ </property>
+ <property name="configFile">
+ <value>src/test/resources/repository.xml</value>
+ </property>
+ </bean>
+
+ <!-- common properties -->
+
+ <bean id="jcrTransactionManager"
+ class="org.springframework.transaction.jta.JtaTransactionManager">
+ <property name="userTransaction">
+ <ref local="userTransaction"/>
+ </property>
+ <property name="transactionManager">
+ <ref local="transactionManagerImpl"/>
+ </property>
+ </bean>
+
+ <bean id="repository" class="org.springframework.jca.support.LocalConnectionFactoryBean">
+ <property name="managedConnectionFactory"><ref local="repositoryManagedConnectionFactory"/></property>
+ <property name="connectionManager"><ref local="connectionManager"/></property>
+ </bean>
+
+
+</beans>
\ No newline at end of file
Added: jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-local.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-local.xml?rev=653577&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-local.xml (added)
+++ jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-jr-local.xml Mon May 5 13:03:45 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+ Local transaction manager only for JackRabbit
+
+ $Id: applicationContext-jr-local.xml,v 1.1 2005/10/10 09:20:42 costin Exp $
+ -->
+<beans>
+ <bean id="jcrTransactionManager"
+ class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
+ <property name="sessionFactory" ref="jcrSessionFactory"/>
+ </bean>
+
+ <bean id="repository" class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
+ <!-- normal factory beans params -->
+ <property name="configuration" value="file:./src/test/resources/repository.xml"/>
+ <property name="homeDir" value="file:./target/repository"/>
+
+ </bean>
+</beans>
\ No newline at end of file
Added: jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-repository.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-repository.xml?rev=653577&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-repository.xml (added)
+++ jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/applicationContext-repository.xml Mon May 5 13:03:45 2008
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+ JSR-170 configuration support. Note that the transaction managers are defined
+ in separate files.
+
+ $Id: applicationContext-repository.xml,v 1.2 2005/10/10 09:20:42 costin Exp $
+ -->
+<beans default-lazy-init="true">
+ <!-- import resource="applicationContext-jr-jca.xml"/ -->
+ <import resource="applicationContext-jr-local.xml"/>
+
+
+ <bean id="jcrSessionFactory" class="org.apache.jackrabbit.ocm.spring.JackrabbitSessionFactory">
+ <property name="repository" ref="repository"/>
+ <property name="credentials">
+ <bean class="javax.jcr.SimpleCredentials">
+ <constructor-arg index="0" value="superuser"/>
+ <!-- create the credentials using a bean factory -->
+ <constructor-arg index="1">
+ <bean factory-bean="password"
+ factory-method="toCharArray"/>
+ </constructor-arg>
+ </bean>
+
+ </property>
+ <property name="nodeTypes2Import" value="file:./src/test/resources/nodetypes/custom_nodetypes.xml"/>
+ </bean>
+
+ <!-- create the password to return it as a char[] -->
+ <bean id="password" class="java.lang.String">
+ <constructor-arg index="0" value="superuser"/>
+ </bean>
+
+
+ <bean id="jcrMappingDescriptor" class="org.apache.jackrabbit.ocm.mapper.impl.digester.DigesterMapperImpl">
+ <constructor-arg index="0" value="./src/test/resources/jcrmapping.xml"/>
+ </bean>
+
+ <bean id="jcrMappingTemplate" class="org.apache.jackrabbit.ocm.spring.JcrMappingTemplate">
+ <constructor-arg index="0" ref="jcrSessionFactory"/>
+ <constructor-arg index="1" ref="jcrMappingDescriptor"/>
+ </bean>
+
+ <bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
+ abstract="true">
+ <property name="transactionManager">
+ <ref bean="jcrTransactionManager"/>
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+
+
+ <bean id="org.apache.jackrabbit.ocm.spring.test.components.impl.NewsServiceImpl"
+ class="org.apache.jackrabbit.ocm.spring.test.components.impl.NewsServiceImpl" >
+ <property name="jcrMappingTemplate" ref="jcrMappingTemplate"/>
+ </bean>
+
+ <bean id="org.apache.jackrabbit.ocm.spring.test.components.NewsService" parent="baseTransactionProxy">
+ <property name="proxyInterfaces">
+ <value>org.apache.jackrabbit.ocm.spring.test.components.NewsService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.jackrabbit.ocm.spring.test.components.impl.NewsServiceImpl"/>
+ </property>
+ <property name="transactionAttributes">
+ <props>
+
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+
+ <bean id="org.apache.jackrabbit.ocm.spring.test.components.impl.ArticleServiceImpl"
+ class="org.apache.jackrabbit.ocm.spring.test.components.impl.ArticleServiceImpl" >
+ <property name="jcrMappingTemplate" ref="jcrMappingTemplate"/>
+ <property name="newsService" ref="org.apache.jackrabbit.ocm.spring.test.components.NewsService"/>
+ </bean>
+
+ <bean id="org.apache.jackrabbit.ocm.spring.test.components.ArticleService" parent="baseTransactionProxy">
+ <property name="proxyInterfaces">
+ <value>org.apache.jackrabbit.ocm.spring.test.components.ArticleService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.jackrabbit.ocm.spring.test.components.impl.ArticleServiceImpl"/>
+ </property>
+ <property name="transactionAttributes">
+ <props>
+
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+
+
+</beans>
\ No newline at end of file
Added: jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jackrabbit-ocm.dtd
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jackrabbit-ocm.dtd?rev=653577&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jackrabbit-ocm.dtd (added)
+++ jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jackrabbit-ocm.dtd Mon May 5 13:03:45 2008
@@ -0,0 +1,165 @@
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<!ELEMENT jackrabbit-ocm (class-descriptor*)>
+
+<!ATTLIST jackrabbit-ocm package CDATA #IMPLIED>
+
+<!--
+ Class descriptor - Each class descriptor describes the mapping strategy used for one a java class
+ * className : the class name
+ * jcrType : the primary jcr node type, optional, default is nt:unstructured
+ * jcrSuperTypes : the jcr super types, optional
+ * jcrMixinTypes: the jcr mixin types (comma separated list) (optional)
+ * extends: name of super class (optional)
+ * abstract: true if this class is abstract and it is used in hierarchy mappings
+ * discriminator true if the mapped node requires an ocm:discriminator node type. This type contains a classname property.
+-->
+<!ELEMENT class-descriptor (implement-descriptor*, field-descriptor*, bean-descriptor*, collection-descriptor*)>
+
+<!ATTLIST class-descriptor
+ className CDATA #REQUIRED
+ jcrType CDATA #IMPLIED
+ jcrSuperTypes CDATA #IMPLIED
+ jcrMixinTypes CDATA #IMPLIED
+ extend CDATA #IMPLIED
+ abstract (true|false) "false"
+ interface (true|false) "false"
+ discriminator (true|false) "true"
+>
+
+<!--
+ Implement descriptor - This descriptor matches to one java interface implemented by the class descriptor
+ interfaceName : the full interface name
+-->
+<!ELEMENT implement-descriptor EMPTY>
+
+<!ATTLIST implement-descriptor
+ interfaceName CDATA #REQUIRED
+>
+
+<!--
+ Field descriptor - A field descriptor maps one atomic object attribute (primitive types, String, Long, ...) into a JCR property
+ * fieldName : the field/attribute name
+ * jcrName : the jcr property name (optional). If it is not defined, fieldname is used to specify the jcr property name
+ * id : specifies if the field is an id. Id is optional. If the class contains an id field, some process can run faster
+ * path : specified if the field is the object path
+ * uuid : specified if the field is the object uuid
+ * converter : AtomicTypeConverter class name to used for this field descriptor. If not defined, a default one is provided by default in function of the field type
+ * jcrDefaultValue : if the field is null, this default value will be used, optional
+ * jcrValueConstraints : a comma separated list of acceptable values, optional
+ * jcrType: specifies the JCR property type (supported jcr property types: String , Date , Long , Doube , Boolean , Binary), optional
+ * jcrAutoCreated: specifies if this JCR property will be autocreated (true/false / default is false), optional
+ * jcrMandatory: specifies if this JCR property is mandatory (true/false / default is false), optional
+ * jcrOnParentVersion: specifies how this JCR property acts on inherited versioned node properties (default is COPY), optional
+ * jcrProtected: specifies if this JCR node property is protected (true/false / default is false), optional
+ * jcrMultiple: specifies if this JCR node property is a multivalued property (true/false / default is false), optional
+-->
+
+<!ELEMENT field-descriptor EMPTY>
+<!ATTLIST field-descriptor
+ fieldName CDATA #REQUIRED
+ jcrName CDATA #IMPLIED
+ id (true | false) "false"
+ path (true | false) "false"
+ uuid (true | false) "false"
+ converter CDATA #IMPLIED
+ jcrDefaultValue CDATA #IMPLIED
+ jcrValueConstraints CDATA #IMPLIED
+ jcrType (String | Date | Long | Doube | Boolean | Binary) #IMPLIED
+ jcrAutoCreated (true | false) "false"
+ jcrMandatory (true | false) "false"
+ jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE | IGNORE | ABORT) "COPY"
+ jcrProtected (true | false) "false"
+ jcrMultiple (true | false) "false"
+>
+
+<!--
+ Bean descriptor - A bean descriptor maps one "complex" object attribute into a JCR node.
+ * fieldName : the field/attribute name
+ * jcrName : the jcr node name (optional). If it is not defined, fieldname is used to specify the jcr node name
+ * proxy : Use lazy loading or not. if true, this attributes is not loaded when the main object is retrieved. it will be loaded when the get method is called.
+ * autoRetrieve : If false, the bean associated to this descriptor is not retrieved when the main ojbect is retrieved
+ * autoUpdate : If false, the bean associated to this descriptor is not updated when the main ojbect is updated
+ * autoInsert : If false, the bean associated to this descriptor is not inserted when the main ojbect is inserted
+ * converter: fully qualified name of the converter class to be used (default is ObjectConverterImpl)
+ * jcrType: defines the node type, optional, nt:unstructured by default
+ * jcrAutoCreated (boolean) default is "false"
+ * jcrMandatory (boolean) default is "false"
+ * jcrOnParentVersion default is "COPY"
+ * jcrProtected (boolean) default is "false"
+ * jcrSameNameSiblings (boolean) default is "false"
+-->
+<!ELEMENT bean-descriptor EMPTY>
+<!ATTLIST bean-descriptor
+ fieldName CDATA #REQUIRED
+ jcrName CDATA #IMPLIED
+ proxy (true | false) "false"
+ autoRetrieve (true|false) "true"
+ autoUpdate (true|false) "true"
+ autoInsert (true|false) "true"
+ converter CDATA #IMPLIED
+ jcrType CDATA #IMPLIED
+ jcrAutoCreated (true | false) "false"
+ jcrMandatory (true | false) "false"
+ jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE | IGNORE | ABORT) "COPY"
+ jcrProtected (true | false) "false"
+ jcrSameNameSiblings (true | false) "false"
+>
+
+<!--
+ Collection descriptor - A collection descriptor maps one object attribute based on a collection (or a map) into a series of JCR nodes.
+ * fieldName : the field/attribute name (matching to the collection attribute), this attribute is used only with some collection converters.
+ * jcrName : the jcr property name (optional). If it is not defined, fieldname is used to specify the jcr node name
+ * proxy : Use lazy loading or not. if true, this attributes is not loaded when the main object is retrieve. it will be loaded when the get method is called.
+ * autoRetrieve : If false, the collection associated to this descriptor is not retrieved when the main ojbect is retrieved
+ * autoUpdate : If false, the collection associated to this descriptor is not updated when the main ojbect is updated
+ * autoInsert : If false, the collection associated to this descriptor is not inserted when the main ojbect is inserted
+ * elementClassName : contains a fully qualified class name. This class is the Object type of the persistent collection elements.
+ * collectionClassName : contains a fully qualified class name. This class must be the Java type of the Collection attribute.
+ This attribute must only specified if the attribute type is not a java.util.Collection (or subclass).
+ The declared class must implement ManageableCollection to let the ocm engine handles this type of collection.
+ * collectionConverter : The class name converter. This is the collection mapping strategy to used.
+ If this attribute is not specify, the default collection mapping strategy is used (DefaultCollectionConverterImpl)
+ * jcrType: defines the node type used for the collection elements, optional
+ * jcrAutoCreated (boolean) default is "false"
+ * jcrMandatory (boolean) default is "false"
+ * jcrOnParentVersion default is "COPY"
+ * jcrProtected (boolean) default is "false"
+ * jcrSameNameSiblings (boolean) default is "false"
+-->
+
+<!ELEMENT collection-descriptor EMPTY>
+<!ATTLIST collection-descriptor
+ fieldName CDATA #REQUIRED
+ jcrName CDATA #IMPLIED
+ proxy (true | false) "false"
+ autoRetrieve (true|false) "true"
+ autoUpdate (true|false) "true"
+ autoInsert (true|false) "true"
+ elementClassName CDATA #IMPLIED
+ collectionClassName CDATA #IMPLIED
+ collectionConverter CDATA #IMPLIED
+ jcrType CDATA #IMPLIED
+ jcrAutoCreated (true | false) "false"
+ jcrMandatory (true | false) "false"
+ jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE | IGNORE | ABORT) "COPY"
+ jcrProtected (true | false) "false"
+ jcrSameNameSiblings (true | false) "false"
+>
Added: jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jcrmapping.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jcrmapping.xml?rev=653577&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jcrmapping.xml (added)
+++ jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/jcrmapping.xml Mon May 5 13:03:45 2008
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jackrabbit-ocm>
+ <class-descriptor className="org.apache.jackrabbit.ocm.spring.test.model.News" discriminator="true">
+ <field-descriptor fieldName="path" path="true" />
+ <field-descriptor fieldName="creationDate" jcrName="creationDate" />
+ <field-descriptor fieldName="content" jcrName="content" />
+ </class-descriptor>
+
+ <class-descriptor className="org.apache.jackrabbit.ocm.spring.test.model.Article" discriminator="true">
+ <field-descriptor fieldName="path" path="true" />
+ <field-descriptor fieldName="title" jcrName="title" />
+ <field-descriptor fieldName="description" jcrName="description" />
+ <field-descriptor fieldName="author" jcrName="author" />
+ <field-descriptor fieldName="creationDate" jcrName="creationDate" />
+ <field-descriptor fieldName="content" jcrName="content" />
+ </class-descriptor>
+
+</jackrabbit-ocm>
Added: jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/repository.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/repository.xml?rev=653577&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/repository.xml (added)
+++ jackrabbit/sandbox/jackrabbit-jcr-mapping/spring/src/test/resources/repository.xml Mon May 5 13:03:45 2008
@@ -0,0 +1,142 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.5//EN"
+ "http://jackrabbit.apache.org/dtd/repository-1.5.dtd">
+<!-- Example Repository Configuration File
+ Used by
+ - org.apache.jackrabbit.core.config.RepositoryConfigTest.java
+ -
+-->
+<Repository>
+ <!--
+ virtual file system where the repository stores global state
+ (e.g. registered namespaces, custom node types, etc.)
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/repository"/>
+ </FileSystem>
+
+ <!--
+ security configuration
+ -->
+ <Security appName="Jackrabbit">
+ <!--
+ security manager:
+ class: FQN of class implementing the JackrabbitSecurityManager interface
+ -->
+ <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security">
+ <!--
+ workspace access:
+ class: FQN of class implementing the WorkspaceAccessManager interface
+ -->
+ <!-- <WorkspaceAccessManager class="..."/> -->
+ <!-- <param name="config" value="${rep.home}/security.xml"/> -->
+ </SecurityManager>
+
+ <!--
+ access manager:
+ class: FQN of class implementing the AccessManager interface
+ -->
+ <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
+ <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+ </AccessManager>
+
+ <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
+ <!-- anonymous user id -->
+ <param name="anonymousId" value="anonymous"/>
+ <!-- administrator user id (default value if param is missing is 'admin') -->
+ <param name="adminId" value="admin"/>
+ <!--
+ default user name to be used instead of the anonymous user
+ when no login credentials are provided (unset by default)
+ -->
+ <!-- <param name="defaultUserId" value="superuser"/> -->
+ </LoginModule>
+ </Security>
+
+ <!--
+ location of workspaces root directory and name of default workspace
+ -->
+ <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+ <!--
+ workspace configuration template:
+ used to create the initial workspace if there's no workspace yet
+ -->
+ <Workspace name="${wsp.name}">
+ <!--
+ virtual file system of the workspace:
+ class: FQN of class implementing the FileSystem interface
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}"/>
+ </FileSystem>
+ <!--
+ persistence manager of the workspace:
+ class: FQN of class implementing the PersistenceManager interface
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
+ <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+ </PersistenceManager>
+ <!--
+ Search index and the file system it uses.
+ class: FQN of class implementing the QueryHandler interface
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${wsp.home}/index"/>
+ <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
+ <param name="extractorPoolSize" value="2"/>
+ <param name="supportHighlighting" value="true"/>
+ </SearchIndex>
+ </Workspace>
+
+ <!--
+ Configures the versioning
+ -->
+ <Versioning rootPath="${rep.home}/version">
+ <!--
+ Configures the filesystem to use for versioning for the respective
+ persistence manager
+ -->
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/version" />
+ </FileSystem>
+
+ <!--
+ Configures the persistence manager to be used for persisting version state.
+ Please note that the current versioning implementation is based on
+ a 'normal' persistence manager, but this could change in future
+ implementations.
+ -->
+ <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
+ <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
+ <param name="schemaObjectPrefix" value="version_"/>
+ </PersistenceManager>
+ </Versioning>
+
+ <!--
+ Search index for content that is shared repository wide
+ (/jcr:system tree, contains mainly versions)
+ -->
+ <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+ <param name="path" value="${rep.home}/repository/index"/>
+ <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
+ <param name="extractorPoolSize" value="2"/>
+ <param name="supportHighlighting" value="true"/>
+ </SearchIndex>
+</Repository>