On Wed, 3 Jul 2002 10:30, Stephen McConnell wrote: > Pete: > > I'm getting some odd results form the containerkit DependecyMap. > I have a situation where I have 3 components that need to run. > A, B and C. A depends on B and C and C depends on B > > When I list the startup graph, I'm basically getting the following > sequence back: > > B, C, A, B, B, C, B > > And for shutdown: > > A, A, C, B, A, C, A, C, B > > Which seems a little strange. What I am expecting is a startup graph of > B, C, A and a shutdown graph of A, C, B (which is what the result would > be if the duplicates in the graph were removed. > Any thoughts ?
The only thing I can think of is that we need to overide equals()/hashcode() somewhere. There should be a method named "visitComponent" that has some code like if( done.contains( component ) ) { return; } done.add( component ); This should agains revisiting but it looks like it may not be??? Alternatively look at a method named "walkGraph" which calls visitComponent for each component in set. Make sure that the "done" list is not created once for each time through the tree walk but once overall. Actually I think it may be the second thingie that could be wrong (as that is new code). -- Cheers, Peter Donald *--------------------------------* | Every rule has an exception, | | except the rule of exceptions. | *--------------------------------* -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>