Hello Peter,

The problem results from a central component that acts as a surveillance
service for the other components. These components should be able to access
the surveillance service to pass information to it but also the service
should be able to query the individual components about their status. So
this is a bidirectional dependency at runtime. It is not a dependency during
initialization which would indeed be unsolvable. 
Therefore my question is if there is a mechanism or commonly used strategy
how to solve runtime dependencies. My own idea is to have one component
dependent on all other components which then calls setter methods on these
components in it's start method. The components would then have references
to the required components at runtime without specifying the corresponding
dependency in the XML descriptor. But this feels more like a circumvention
than a solution.

Any ideas?

Jan

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 4. Oktober 2004 17:04
> An: [EMAIL PROTECTED]
> Betreff: SV: Circular dependencies
> 
> 
> Hi Jan,
> I actually submitted a patch to find Circular Deps for some 
> weeks ago. This
> is done during the Assembly phase during the startup of Merlin.
> It was possible before but not recommended to have cirkular 
> dependencies.
> What exactly is your problem? Maybe we could sort out the 
> decomposition of
> the dependency?
> 
> /peter
> 
> > -----Ursprungligt meddelande-----
> > Från: Jan Schröter [mailto:[EMAIL PROTECTED]
> > Skickat: den 4 oktober 2004 09:07
> > Till: '[EMAIL PROTECTED]'
> > Ämne: Circular dependencies
> > 
> > 
> > Hi all,
> > 
> > I have got a question about circular dependencies in 
> > Avalon/Merlin. Merlin
> > seems to prevent this kind of relationship during startup 
> > while it's not
> > impossible to specify it within the XML component 
> > descriptions. As Avalon
> > uses a component initialization process based on stages I 
> > don't see why this
> > can't work. So the question is: How can I initialize a system 
> > of components
> > with circular dependencies without causing Merlin to 
> terminate during
> > startup? Has anybody experienced similar problems and how did 
> > you solve
> > them?
> > 
> > I would be glad if anyone has usefull information about 
> this problem.
> > 
> > Thanks,
> > 
> > Jan
> > 
> > 
> > _______________________________________________
> > 
> > Ernst Basler + Partner GmbH  
> > Jan Schröter                
> > Tuchmacherstraße 47        
> > DE-14482 Potsdam
> > 
> > http://www.ebp.de            mailto:[EMAIL PROTECTED]
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 

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

Reply via email to