Apache » Cocoon »

  Cocoon Spring Configurator
      2.1
   homepage

Cocoon Spring Configurator 2.1

Running Modes

Running Modes

The configurator provides the support of running modes. A running mode defines the environment the application is currently running in. For example this can be during development, a test setup or production. As you will see in just some paragraphs, the configurator can use different configurations and settings depending on the running mode.

A running mode is just a unique text key, like dev, test or prod. This key is used to determine the correct configuration at runtime. Although you can use any text key, it is advisable to use one of the standard keys (dev, test or prod).

The running mode can be set in two ways: you can either set it in your applicationContext.xml as a configuration for the settings element:

   <!-- Activate Cocoon Spring Configurator -->
   <configurator:settings runningMode="test"/>

Or you can define the running mode by setting the system property org.apache.cocoon.mode on startup of your web application, usually you do this by specifying -Dorg.apache.cocoon.mode=test when starting your application server. The system property has precedence over the value from the application context. The default running mode is prod.