Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On this page:

Table of Contents

Configuring the Server Module

Beginning with Fedora 3.6, the Fedora Server module (ie, the implementation of org.fcrepo.server.Server) is configured in the Spring application context.  This file is located under the Fedora web-app's WEB-INF directory; in the Tomcat unpacked by the installer, this will be in $FEDORA_HOME/tomcat/webapps/fedora/WEB-INF/applicationContext.xml.  In this file, there is a Spring bean with an id of "org.fcrepo.server.ServerConfiguration" that reproduces the server module configurations that used to be available in the fedora.fcfg file.  For example, specifying the hostname of your FCRepo server is done by changing the value of configuration Parameter of that bean whose first argument is "fedoraServerHost".  Other configurable parameters include:

  • datastreamExtensionMappingSource
  • datastreamExtensionMappingId
  • httpClientMaxConnectionsPerHost
  • httpClientSocketTimeoutSecs
  • fedoraServerHost
  • datastreamExtensionMappingLabel
  • fedoraServerPort
  • fedoraRedirectPort

... and others.  The applicationContext.xml file is annotated with notes describing the configurable parameters and their acceptable values.

Configuring Modules

In the transition of 3.5, the interface of a module (also called the "role" in .fcfg files) is the name/id by which the module bean will be requested from the application context.  Thus, if you are configuring the DOManager as a bean, you may write the following configuration to use the default implementation as a Spring bean:

...

Code Block
<bean id="org.fcrepo.server.storage.DOManagerConfiguration"
 name="org.fcrepo.server.storage.DOManagerConfiguration"
 class="org.fcrepo.server.config.ModuleConfiguration"
 autowire-candidate="true">
<constructor-arg index="0">
<list>
<bean>
<constructor-arg type="java.lang.String" value="pidNamespace" />
<property name="value" value="changeme" />
</bean>
<bean>
<constructor-arg type="java.lang.String" value="storagePool" />
<property name="value" value="localDerbyPool" />
</bean>
<bean>
<constructor-arg type="java.lang.String" value="storageCharacterEncoding" />
<property name="value" value="UTF-8" />
</bean>
<bean>
<constructor-arg type="java.lang.String" value="defaultExportFormat" />
<property name="value" value="info:fedora/fedora-system:FOXML-1.1" />
</bean>
<bean>
<constructor-arg type="java.lang.String" value="gSearchRESTURL" />
<property name="value" value="http://localhost:8080/fedoragsearch/rest" />
</bean>
<bean>
<constructor-arg type="java.lang.String" value="gSearchUsername" />
<property name="value" value="exampleUsername" />
</bean>
<bean>
<constructor-arg type="java.lang.String" value="gSearchPassword" />
<property name="value" value="examplePassword" />
</bean>
</list>
</constructor-arg>
<constructor-arg index="1" type="java.lang.String" value="org.fcrepo.server.storage.DOManager" />
<constructor-arg index="2" type="java.lang.String" value="org.fcrepo.server.storage.DefaultDOManager" />
<constructor-arg index="3" type="java.lang.String" value="The interface to the storage subsystem." />
</bean>

foo

Required Bean Configurations

...