commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingfai Ma" <>
Subject [Configuration/Digester] best practice of loading configuration
Date Wed, 12 Feb 2003 15:13:56 GMT
how do you design your system to load static configuration? there are a few
ways as I know:

1. Properties.load() or Commons-Configuration
	- the configurations are stored in properties file and is loaded to a
Properties for further processing
	- it's the traditional way
	- the Commons Configuration provides additional benefit as it allow
repeated value-pair
		(as far as i know, the XML Configuration has nothing, so, i don't include

2. Digester
	- configurations are stored in xml file, and is processed sequentially by
 	- i used Digestor in one of my project last year. i think Digester is
powerful. but as my configuration was changed a couple of times, it turns
out I have to maintain the Digester rules which are quite clumsy.

3. JAXB / XML-to-Object mapping
	- i think it's not a common way, but technically possible. just map the
configuration xml to an object and process further.
	- but... it seems to be more "clean" in design

are there other common ways? what is the best practice to load static
configuration? and how about loading to a MBean? I wonder the ways can be
compared by maintainability, easy of development, easy of learning etc.


View raw message