cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Fiol BonnĂ­n" <antonio.f...@gmail.com>
Subject Re: [2.2] Simplifying configuration
Date Wed, 01 Mar 2006 10:52:39 GMT
Some thoughts (my opinion) about configuration.

1. Environment-related configuration should be banned inside the
webapp directory (or WAR file).

2. Business-related configuration should be inside it.

Developing it a little more you will see why I state that.

a. The developer of an application (cocoon-based or any other) does
not necessarily know about the production environment things like:
   - Host names and ports
   - Paths
   - Timeouts required (e.g by firewalls closing connections) or
configured in other applications
   - Memory sizes
   - JVM parametrization

b. The system administrator knows all of the above.

c. Some of the above might have sensible defaults, which the developer knows.

d. The developer usually knows the right values for business-related
configuration.

e. The system administrator does not know about business-related
configuration, but...

f. The system administrator could be asked to change some
business-related configuration.


For that, in our company we developed a simple component based on
Commons Configuration and a policy for developers that solves all a-e
points.

There are basically two configuration sources: one of them supplied by
the developer and one of them supplied by the administrator. The first
one is, in our case, a XML file inside the WAR file, and the second
one is the JNDI environment.

We use Tomcat, so the JNDI environment is very easy to setup, i.e. you
only have to add <Environment ... /> entries in the context XML file.

It is probably quite difficult to achieve (a) to (e) for Cocoon, given
the complexity of the configuration. But... wait! Most of it is
"business" configuration. So... only non-business would need to be
extracted to another configuration source.

WDYT?

--
Antonio

Mime
View raw message