On Tuesday 10 February 2004 17:41, Stephan Coboos wrote:
> Niclas Hedhman wrote:
> >and set it back to null, when you release the component?
>
> Hmm, yes this should work. But I think it is not the best way. In my
> opinion the best way would be to have a method which does this for me by
> the serviceManager. What do you think?

ServiceManager won't do anything for you...

> What about start() and stop()?

Nope.

> >I think I understand what you are asking; "What is the Design Pattern for
> >implementing a Component Pool?"

Actually, I was wrong, this is not what you are asking either... (I realize 
that after starting to write the Wiki).

Let's look at your use case again...

1. CompA calls CompB
2. CompB retrieves a CompC.
3. CompB calls a method in CompC.
4. CompB returns to CompA.
5. CompA calls another method in CompB.
6. CompB calls a method in the same CompC.
7. CompB returns to CompA.
8. CompA calls CompB.recycle();
9. CompB releases CompC.

Is this correct? (hard to follow?)

I still think that the simple "== null" is more than sufficient.
Easy to understand, implement and maintain.

Niclas

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

Reply via email to