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)
<h2>Motivation</h2>
<p>When using a framework like Spring there are always the same problems to
--- solve like</p>
+++ solve, like</p>
<ul>
<li>Where do I store my bean configurations?</li>
(64 equal lines skipped)
<p>And then...</p>
+++ <h2>Running Modes</h2>
+++
+++ <p>The configurator provides the support of <em>running modes</em>. 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.</p>
+++
+++ <p>A running mode is just a unique text key, like <tt>dev</tt>,
<tt>test</tt>
+++ or <tt>prod</tt>. 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).</p>
+++
+++ <p>The running mode can be set in two ways: you can either set it in your
+++ <tt>applicationContext.xml</tt> as a configuration for the <tt>settings
+++ </tt>element:</p>
+++
+++ <pre> <!-- Activate Cocoon Spring Configurator -->
+++ <configurator:settings runningMode="test"/>
+++ </pre>
+++
+++ <p>Or you can define the running mode by setting the system property
+++ <tt>org.apache.cocoon.mode</tt> on startup of your web application, usually
you
+++ do this by specifying <tt>-Dorg.apache.cocoon.mode=test</tt> when starting
your
+++ application server. The system property has precedence over the value from
the
+++ application context. The default running mode is <tt>prod</tt>.</p>
+++
+++ <h2>Property Configurations</h2>
+++
+++ <p>For using properties in your configuration files, Spring provides the
+++ <a
href="http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-placeholderconfigurer">property
+++ placeholder configurer</a> which you have to configure in your application
+++ context. The Spring Configurator has already built-in support for replacing
+++ property values in configuration files.</p>
+++
+++ <p>TODO</p>
+++
</body>
</html>