commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Oliver Heger)
Subject Re: [Configuration] Newbie question on <addidtional>
Date Fri, 17 Sep 2004 17:31:10 GMT
To see the difference just imagine you have two configuration sources 
which both define the same property, e.g. source 1 has myproperty = a 
and source 2 has myproperty = b.

If these sources are contained outside an <additional> section, a 
getProperty("myproperty") would result either in the value "a" or "b", 
depending on the order in which the sources are included.

Inside an <additional> section getProperty("myproperty") would return a 
list with the two values "a" and "b". As you can see, here really a 
union was constructed.


Ron Jones wrote:

> This is an interesting and useful package. I'm hoping someone can help 
> me understand the <additional> tag a little better.
> The documentation states ...
> "It is possible to specify in the configuration definition file that 
> from a set of configuration sources a logic union configuration is to 
> be constructed. Then all properties defined in the provided sources 
> are collected and can be accessed as if they had been defined in a 
> single source."
> As I understand it, this tag allows serveral configs to be treated as 
> one logical unit. In addition, anything outside this tag (i.e. under 
> <configuration>) overrides whatever is in <additional>. With all that 
> in mind, what the difference between just putting everything under the 
> <configuration>
> tag. The order under the <configuration> tag in effect dictates the 
> override behavior.
> The only difference I can see is that the <additional> tag offers the 
> opportunity to use the "at" attribute.
> _________________________________________________________________
> Take advantage of powerful junk e-mail filters built on patented 
> Microsoft® SmartScreen Technology. 

>  Start enjoying all the benefits of MSN® Premium right now and get the 
> first two months FREE*.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message