[jboss-dev] Bootstrap Configuration Overrides

Andrew Lee Rubinger andrew.rubinger at redhat.com
Tue Apr 21 11:29:36 EDT 2009


I'm in the process of reforming the JBossAS Configuration within the 
Bootstrap Project.

Each configuration property may come from:

* Object model
   ie. config.getJBossHome()
* System property
   ie. -Djboss.home=/myJBossHome
* Configuration property
   ie. config.getProperty("jboss.home")
* Environment Variable
   (optional, ie. $JBOSS_HOME)

What do we think the order of preference should be in determining which 
value is authoritative?  I'm thinking the following rules:

System Property > Configuration Property > Object Model > Environment 
Variable

...this means that anything may be overridden from the command line. 
Environment variable comes last as it may be used to fall back on some 
default.  In truth all system properties get dumped into the 
configuration properties upon config creation, so system props is a 
subset of config props (more may be programmatically added to config 
props after config creation).

If at the end of this chain a property is still unspecified, we'll set 
it to some intelligent default, following a "convention over 
configuration" paradigm.

Thoughts?

S,
ALR

-- 
Andrew Lee Rubinger
Sr. Software Engineer
JBoss, a division of Red Hat, Inc.
http://exitcondition.alrubinger.com



More information about the jboss-development mailing list