Pete:

I'm not quite sure that "merge" and "cascading" are semantically
equivalent (maybe it is), however, I do prefer the cascading
pattern used with Context and ComponentManager (as opposed to
util.mergeConfiguration, util.mergeContext, until.mergeMananger).

In addition, the cascading configuration model executes effective
merging at a much finer granularity.  Invoking getChild on a
CascadingConfiguration returns a CascadingConfiguration instance
and subsequent evaluations of values are much more constrained.
Merging would require a lot more processing at the merge point
because you have to merge n level of child element aggregation
and then take care of attribute merging as well (which I think
may have hidden problems).

Cheers, Steve.


> -----Original Message-----
> From: Peter Donald [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 12 February, 2002 21:08
> To: Avalon Developers List
> Subject: Re: Cascading Configuration
>
>
> On Tue, 12 Feb 2002 23:10, Torsten Curdt wrote:
> > Wouldn't it make sense to also have a
> >
> >  class CascadingConfiguration extends AbstractConfiguration {
> >
> >    public CascadingConfiguration( Configuration conf ) {
> >     ...
> >
> > So we can apply the same pattern as for the ComponentManager or the
> > RoleManager? So you easily split configuration files...
>
> I think there is two things here that you may be trying to do. One is to
> merge two Configuration trees (ie a tree of defaults and a tree of real
> values) and another may to be include one default tree in another tree.
>
> So instead of altering configuration in any way it may be best to add a
> method like
>
> Configuration mergedTree = ConfigurationUtil.merge( realTree,
> defaultsTree );
>
> and use xinclude to do the including.
>
> --
> Cheers,
>
> Pete
>
> *----------------------------------------------*
> | The best defense against logic is ignorance. |
> *----------------------------------------------*
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to