Application Configuration
The Fedora 4 web-application supports several deploy-time, system-level configuration options. These configuration elements are set via the definition of System Properties.
Deployments
Four means of deploying Fedora 4 have been verified
- Tomcat 7 servlet container
- Jetty 9 servlet container
- Maven jetty:run plugin - for testing
- One-Click Run - for testing
Each of these deployment approaches has its own way of setting System Properties.
Tomcat 7
On Debian Linux systems, the typical way of setting System Properties is to update the following file:
/etc/default/tomcat7
Within that file, new properties can be added per the example below:
JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.home=/mnt/fedora-data"
Additional information regarding the configuration of System Properties in Tomcat 7 can be found here.
Jetty 9
On Debian Linux systems, one way of setting System Properties is to update the following file:
/etc/default/jetty
Within that file, new properties can be added per the example below (note the use of JAVA_OPTIONS instead of JAVA_OPTS):
JAVA_OPTIONS="${JAVA_OPTIONS} -Dfcrepo.home=/mnt/fedora-data"
Additional information regarding the configuration of System Properties in Jetty 9 can be found here.
Maven jetty:run
System Properties can be set when using the Maven jetty:run plugin by passing them per the example below:
mvn -Dfcrepo.home=/mnt/fedora-data jetty:run
One-Click Run
If the One-Click Run is started from the command line, System Properties can be passed in per the example below:
java -Dfcrepo.home=/mnt/fedora-data -jar fcrepo-webapp-jetty-console.war
Configuration Elements
There are a number of configuration elements that can be optionally be set when starting the Fedora 4 web-application. No configuration elements are required to be set, as they all default values (noted below within brackets: <>).
fcrepo.home=<cwd/fcrepo4-data>
This can be set to a path (relative to the current working directory or absolute) to which Fedora repository content will be written. Any of the Modeshape and Infinispan configuration options below will default to being within this folder if unset or if set to a relative path. If unset, content will be put in the "fcrepo4-data" directory within the current working directory.
fcrepo.modeshape.configuration=<classpath:/config/minimal-default/repository.json>
This specifies the configuration for the underlying Modeshape repository. See other available options for this value within the source tree.
fcrepo.infinispan.cache_configuration=<config/infinispan/leveldb-default/infinispan.xml>