Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 41889 invoked from network); 3 Jan 2007 20:36:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2007 20:36:49 -0000 Received: (qmail 60711 invoked by uid 500); 3 Jan 2007 20:36:56 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 60574 invoked by uid 500); 3 Jan 2007 20:36:55 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org List-Id: Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 60563 invoked by uid 99); 3 Jan 2007 20:36:55 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.67] (HELO cocoon.zones.apache.org) (140.211.11.67) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2007 12:36:55 -0800 Message-ID: <460435.1167856588612.JavaMail.daisy@cocoon.zones.apache.org> Date: Wed, 3 Jan 2007 20:36:28 +0000 (GMT+00:00) From: daisy@cocoon.zones.apache.org To: docs@cocoon.apache.org Subject: [DAISY] Updated: The Spring Configurator Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org A document has been updated: http://cocoon.zones.apache.org/daisy/documentation/1303.html Document ID: 1303 Branch: main Language: default Name: The Spring Configurator (unchanged) Document Type: Cocoon Document (unchanged) Updated on: 1/3/07 8:36:25 PM Updated by: Carsten Ziegeler A new version has been created, state: publish Parts ===== Content ------- This part has been updated. Mime type: text/xml (unchanged) File name: (unchanged) Size: 5582 bytes (previous version: 3818 bytes) Content diff: (13 equal lines skipped)

Motivation

When using a framework like Spring there are always the same problems to --- solve like

+++ solve, like

  • Where do I store my bean configurations?
  • (64 equal lines skipped)

    And then...

    +++

    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.

    +++ +++

    Property Configurations

    +++ +++

    For using properties in your configuration files, Spring provides the +++ property +++ placeholder configurer which you have to configure in your application +++ context. The Spring Configurator has already built-in support for replacing +++ property values in configuration files.

    +++ +++

    TODO

    +++