Archived

If you are looking for the last documentation in the 4.x series, see 4.7.5. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Here is found details of the locations and purposes of the Fedora 4 configuration files. For details on how to enable and configure these options, see this page.

fcrepo-webapp

Fedora RESTful HTTP API uses the open source Jersey RESTful Web Services framework that provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation. The jersey servlet dispatcher is configured in web.xml as follows:

web.xml
<servlet>
  <servlet-name>jersey-servlet</servlet-name>
  <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
  <init-param>
    <param-name>javax.ws.rs.Application</param-name>
    <param-value>org.fcrepo.http.commons.FedoraApplication</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>

 

The following spring files exist in a directory as configured in web.xml, which contains a context-param element with param-name "contextConfigLocation".  The param-value points to a spring context configuration file "WEB-INF/classes/spring/repository.xml". This configuration file imports a settings file located in the same directory or the file specified by system property fcrepo.spring.configuration. Note that these files are in the source tree under fcrepo-webapp/src/main/resources/spring and copied to WEB-INF/classes upon build.

fcrepo-webapp/src/main/resources/spring

repository.xml

  • this imports all the settings from either the file specified in the system property fcrepo.spring.configuration or the provided configuration file fcrepo-config.xml
repo.xml
  <!-- Master context for fcrepo4. -->
  <import resource="${fcrepo.spring.configuration:classpath:/spring/fcrepo-config.xml}"/>

fcrepo-config.xml

This is where you configure your Fedora instance, including:

  • specify the repository.json file to be loaded as the repositoryConfiguration or use the fcrepo.modeshape.configuration system property.
  • bean for repository factory and metrics
  • bean implementation for InternalIdentifierConverter (identifier  translationChain),   StoragePolicyDecisionPointImpl, SessionFactory, and base-packages to auto scan into spring
  • bean implementation for eventing - observer, filter, event bus
  • specify the implementation for processing events
  • config for transactions
  • bean implementation for minting identifiers

It is recommended to use the provided fcrepo-config.xml as a starting point for your customization.

fcrepo4/fcrepo-configs/src/main/resources/config

activemq.xml

  • config for message broker

jgroups-fcrepo-tcp.xml

  • Config for the Messaging Toolkit JGroups to transfer state between nodes in a Fedora Cluster.

fcrepo4/fcrepo-webapp/src/main/resources

logback.xml

Modeshape repository configuration

Fedora 4 uses Modeshape, a JCR implementation. We distribute a handful of known-good configurations for Modeshape, although we anticipate configuration tuning for deployment environments will be common.

https://github.com/ModeShape/modeshape/blob/master/modeshape-jcr/src/main/resources/org/modeshape/jcr/repository-config-schema.json

Repository Config Options

These configuration files are copied to WEB-INF/classes from fcrepo-configs/src/main/resources upon build.

/config/clustered-mysql/repository.json

  • Configuration for clustered repositories with a centralized MySQL object store.

/config/file-simple/repository.json

  • Configuration for file-based object store for testing, not recommended for production. 

/config/jdbc-mysql/repository.json 

  • Configuration for MySQL-based object store. 

/config/jdbc-postgresql/repository.json

  • Configuration for PostgreSQL-based object store.

/config/servlet-auth/repository.json

  • Configuration with servlet authentication enabled.

Fedora 4 will store object properties to the configured backend datastore. These probably won't be very large, and should be stored on fast disk. The object properties are stored as binary JSON documents within the given cache store configuration.

Binary storage

fcrepo.binary.directory:target/binaries

Fedora 4 stores binary content separately (to one of the above paths, depending on configuration). These files are stored hashed by the content SHA-1 hash. 


Parallel stream processing

fcrepo.streaming.parallel:false

If you are running Fedora on a multiprocessor machine you can level parallel processing across single requests by turning this option on.   Parallel processing of streams can boost the retrieval speeds of the RDF associated with objects with large numbers of inlinks (ie dependent objects with memberOf associations).  Enabling this option in conjunction with increasing with cacheSize parameter in your repository.json file can boost retrieval speeds significantly.


  • No labels