(My SMTP server is cracking up)
-------- Original Message -------- Subject: Re: ExcaliburComponentManager: component startup sequence Date: Fri, 08 Mar 2002 09:53:23 -0500 From: Berin Loritsch <[EMAIL PROTECTED]> To: Avalon Developers List <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Christian Haul wrote: > 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> > > AFAIU ECM uses a BucketMap to store the component handlers and > initializes them in the order returned by the map. Hence this sequence > does not reflect the order in which the components appeared in the > configuration file and dependencies whithin a single config file (or a > ECM) during startup might break. > > Is this correct? Is there a way to allow such dependencies? What the ECM and the ContainerManager do is create the handlers for the components, but do not initialize them. When the Container or ECM is initialized, it already has the handlers defined. They both go through the list of handlers they have and initialize them one by one. If any component requires another component that is not initialized yet, it is initialized on demand, and a reference to that component is returned. It really works, try it! In essence, unless you have a circular dependancy, you will never have a problem on setup. -- "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin -- "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
