Hi All,
        
        Hope all is well!

        Sorry for asking such a simple question, but I'm kinda stuck,
        and I'd like to learn how to use avalon the way it was intended :)

        Pretty simple question, hence the title - I'm wondering how others
        access global configuration settings specified in xml files, when
        configuring managed components.

        I have a few settings like 'default operating mode', 'default
        server locale', 'default unavailable time' etc, which are not
        really applicable to any one component in my app, but are global
        across the entire application and commonly required by several
        components - I'm wondering where I should specify them in our .xconf
        config file, and how I should access them in my application.

        Using the component manager described in Berin's document I can easily
        create a config file for all my components and have them automatically
        configured which is really cool - but how should I obtain
        non-per-component specific options ?

        Should I create a 'globals' component or similar so that I have
        something like:

        <app>
                <globals>
                        <operating-mode>test</operating-mode>
                        <unavailable-time>100</unavailable-time>
                        <server-locale>en_AU</server-locale>
                </globals>
        </app>

        and so on ? I can see how this would work - but is this overkill ?
        (ie. creating a whole new component simply just to store some values).

        Something like:

        <app mode="test">
                <unavailable-time>100</unavailable-time>
                <server-locale>de_DE</server_locale>
        </app>

        would be possible if I handled everything manually, but I can't see
        how I can access these values from a managed component - The
        Configuration object passed via configure() Component is not the
        complete file, just what's under it's component definition.
        
        Perhaps I should save the values somewhere before calling
        ComponentManager.configure() ?

        Any thoughts ? Ideas ? Obviously I'm still learning :)

        Cheers,

        Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Managesoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : [EMAIL PROTECTED]
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:

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

Reply via email to