On Thu, 14 Feb 2002 12:53, Leif Mortenson wrote: > I don't think that you can start things up with circular dependencies. > If Component A obtaines a reference to Component B in A's initialize > method, that will work. But if B also tries to obtain a reference to > Component A that will fail because A has not yet been initialized. (I > think that it actually creates another copy of Compnent A which in turn > creates a second copy of B etc... Going into an infinite loop... ?? I > ran into this creating the datasource.cluster package.)
You should not be able to create circular references but it can happen unless you go out of your way to stop it. At different stages both ECm and phoenix have had similar problems with circular references creeping in. > As long as components are looked up and released in the initialize and > dispose methods you shouldn't be able to get into any circular > dependency problems. Theres no need to ever release the components if you are using it in this fashion. The container can record which components are requested and automatically release them when destroying the component (this is what phoenix does because it makes it easier for block writer). -- Cheers, Pete *-----------------------------------------------------------------------* PROGRAM: n. a magic spell cast over a computer allowing it to turn one's input into error messages. v.t. to engage in a pastime similar to banging one's head against a wall, but with fewer opportunities for reward. *-----------------------------------------------------------------------* -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
