You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Antonio Fiol Bonnín <an...@gmail.com> on 2006/03/01 11:52:39 UTC

Re: [2.2] Simplifying configuration

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

Re: [2.2] Simplifying configuration

Posted by Reinhard Poetz <re...@apache.org>.
Antonio Fiol Bonnín wrote:
> 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.
[...]

Thanks for sharing your ideas! After having some working prototype of the OSGi 
based blocks-fw (expect this within the next 6-8 weeks), we will certainly 
discuss configuration management in detail. Your mail is certainly a good 
starting point, especially your idea of differentiating between environment 
related configuration and business-related configurations.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

	

	
		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de