Paulo wrote: ||| As I mentioned before, in my "ComponentManager" I keep track of ||| components using a token. ||| ||| <description snipped>
Yeah, that is what I initially was thinking about doing. But I wanted something compatible with the current CM interface. That's what I liked about Peter's proposal; we wouldn't have to change the interface to include a token. I like the releaseAll() methods though. We should still be able to add those using Peter's strategy. ||| > -----Original Message----- ||| > From: Peter Donald [mailto:[EMAIL PROTECTED]] ||| > Sent: Thursday, February 14, 2002 8:53 AM ||| > To: Avalon Developers List ||| > ||| > ||| > > ... ||| > > ||| > > how would the container know which components had looked up which ||| > > other components? ||| > > ||| > > suppose component X looks up component Y but never releases it. ||| > > ||| > > when disposing of X, the container knows that Y is "checked out" ||| > > but it doesn't necessarily know that X is the component that has ||| > > it checked out. ||| > ||| > Well some implementations do track it - I think I made the ||| > phoenix one do it ||| > - or at least I was planning to make it do it ;) ||| > ||| > Everytime there is a call to lookup() your ComponentManager marks which ||| > component was requested. You make sure that you have a separate ||| > ComponentManager instance for each component (probably all ||| > inheriting from a ||| > central ComponentManager). When that component gets shutdown you ||| > end up with ||| > a list of components that it requested. ||| > ||| > Thus you know that which ones are still checked out by the dead ||| > component :) ||| > That make sense ? ||| > ||| > -- ||| > Cheers, ||| > ||| > Pete ||| > ||| > ------------------------------------------------------------- ||| > | Egoism is the drug that soothes the pain of stupidity. | ||| > ------------------------------------------------------------- ||| ||| ||| -- ||| To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> ||| For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> ||| ||| -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>