avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@dff.st>
Subject RE: [PATCH] Re: Cascading Configuration
Date Wed, 13 Feb 2002 15:04:14 GMT

> For reference I've included a trace of some tests using
> the CascadingConfiguration class (and a good excuse to do
> a quick demo my microPhoenix pipeline processor):
>
> $ java -jar dist\orb-examples.jar -server org.apache.hello.HelloServer
>
>   [DEBUG  ] (manager): manager ready
>   [INFO   ] (manager): processing pipeline for: server
>   [DEBUG  ] (manager.server): initialize
>   [INFO   ] (manager.server): getting configurations
>
> Here I'm printing out the number of children of the parent
> configuration, the value of a "value" attribute on the parent,
> and an attribute "name" of a child named "feature".
>
>   [INFO   ] (manager.server): PARENT LENGTH:  3
>   [INFO   ] (manager.server): PARENT VALUE:   daddy
>   [INFO   ] (manager.server): PARENT FEATURE: Paris by Night
>
> Here I'm printing out the number of children of the target
> configuration, the value of an "value" attribute on the target,
> and an attribute "name" of a child named "feature".
>
>   [INFO   ] (manager.server): TARGET LENGTH:  2
>   [INFO   ] (manager.server): TARGET VALUE:   null
>   [INFO   ] (manager.server): TARGET FEATURE: Paris by Day
>
> Now I'm creating a new CascadingConfiguration with target as
> the base configuration and parent as the default fallback
> configuration.  The important this to note are:
>
>   a) the composite length is the aggregation of the parent
>      and base elements
>
>   b) the value attribute was null in target and the
>      resolution correct defers to the parent (inhertance)
>
>   c) the value of the attribute "name" of the child "feature" ]
>      is retrieved from the target - demonstrating that the
>      tarrget is overriding the parent
>
>   [INFO   ] (manager.server): COMPOSITE LENGTH:  5
>   [INFO   ] (manager.server): COMPOSITE VALUE:   daddy
>   [INFO   ] (manager.server): COMPOSITE FEATURE: Paris by Day
>
>   [INFO   ] (manager): stopping: SERVER
>   [DEBUG  ] (manager.server.orb.14602493): stop
>   [INFO   ] (manager): disposal: SERVER
>   [DEBUG  ] (manager.server): dispose
>   [INFO   ] (manager): stopping: ORB-FACTORY
>   [INFO   ] (manager): disposal: ORB-FACTORY

Cool! But why do you need the CascadingConfiguration anymore? With the
provided patch this should be possible just with the DefaultConfiguration.

...although with this approach you can more easily switch what is to be
the default :-/ ...but it's another wrapper object (AFAIU)
--
Torsten


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message