Berin,

this may be something that's needed for the ContainerManager.

    <component role="quux" handler="..."/>

    <component role="foo" handler="...">
        <instance xyz/>
    </component>

    <component role="bar" handler="barhandler" depends="foo,quux">
        <instance abc/> <!-- needs foo for setup -->
    </component>

> From: Christian Haul [mailto:[EMAIL PROTECTED]]
>
> Hi.
>
> Is it possible to have components that depend on others from the same
> configuration file? Like
>
>    <component foo>
>        <instance xyz/>
>    </compopnent foo>
>
>    <component bar>
>        <instance abc/> <!-- needs foo for setup -->
>    </component bar>

Christian,

The only solution I can think of is that you use lazy initialization in bar.
For every method you expose through bar's interface, call a synchronized
setup() method that will set up the component if it has not been done yet.

Use the compose(), configure() and contextualize() method just to get
references
to the CM, config and context, and store them in member variables so setup()
can use them.

/LS


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

Reply via email to