cancel
Showing results for 
Search instead for 
Did you mean: 
resplin
Elite Collaborator
Elite Collaborator

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com




Introduction


In Alfresco releases prior to version 3.2, the preferred way of providing customized values to configuration properties was to override the actual Spring bean definitions of the repository-properties and hibernateConfigProperties beans so that they pulled in extra property files with the custom settings. The hibernateConfigProperties bean provided parameters to the Hibernate database persistence layer, and repository-properties controlled almost all other configuration properties. The dev-context.xml mechanism described on the page Overriding Spring Configuration was used to configure the custom definitions of these beans.


Example dev-context.xml


Here is an example of a dev-context.xml that pulls in user repository properties from alfresco/extension/custom-repository.properties in the classpath and hibernate properties from alfresco/extension/custom-hibernate-dialect.properties. On Tomcat installations, these would correspond to the locations $TOMCAT_HOME/shared/classes/alfresco/extension/custom-repository.properties and $TOMCAT_HOME/shared/classes/alfresco/extension/custom-hibernate-dialect.properties.



<beans>
  
    <bean id='repository-properties' class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'>
        <property name='ignoreUnresolvablePlaceholders'>
            <value>true</value>
        </property>
        <property name='locations'>
            <list>
                <value>classpath:alfresco/repository.properties</value>
                <value>classpath:alfresco/version.properties</value>
                <value>classpath:alfresco/domain/transaction.properties</value>

                <value>classpath:alfresco/extension/custom-repository.properties</value>
            </list>
        </property>
    </bean>

    <bean id='hibernateConfigProperties' class='org.springframework.beans.factory.config.PropertiesFactoryBean'>
        <property name='locations'>
            <list>
                <value>classpath:alfresco/domain/hibernate-cfg.properties</value>

                <value>classpath:alfresco/extension/custom-hibernate-dialect.properties</value>
            </list>
        </property>
    </bean>
   
</beans>

You may prefer to specify absolute paths rather than classpath relative paths to your custom properties files. For example, on MS Windows you might specify the following:



                <value>file:C:\etc\alfresco\custom-repository.properties</value>

or on UNIX/Linux:



                <value>file:/etc/opt/alfresco/custom-repository.properties</value>

Example custom-repository.properites


Perhaps the most important property to include in your custom-repository.properties file is the dir.root property, which controls the path under which all Alfresco's file data is persisted. For example, on MS Windows, it might contain the following. Note how the backslash character has to be escaped in a .properties file.



dir.root=c:\\temp\\alfresco

On UNIX/Linux, it might contain:



dir.root=/var/opt/alfresco

Configuration