You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Davanum Srinivas <di...@yahoo.com> on 2001/04/13 16:12:11 UTC

[C2] Avalon Disposable for releasing Components look'ed up in compose()

Berin,
There are many instances where we do a manager.lookup in compose() but we never call
manager.release(). Was thinking of implementing Disposable for such classes and call
manager.release in dispose() function. Is this ok? Will the Avalon Lifecycle take care of calling
dispose() auto-magically?

Carsten,
In AbstractEventPipeline, CachingEventPipeling, NonCachingStreamPipeline.java:
- Please use the same selector to do both lookup and release
- Am not sure if all Components looked up are released. 

Thanks,
dims

=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] Avalon Disposable for releasing Components look'ed up in compose()

Posted by Berin Loritsch <bl...@apache.org>.
Davanum Srinivas wrote:
> 
> Berin,
> There are many instances where we do a manager.lookup in compose() but we never call
> manager.release(). Was thinking of implementing Disposable for such classes and call
> manager.release in dispose() function. Is this ok? Will the Avalon Lifecycle take care of calling
> dispose() auto-magically?
> 
> Carsten,
> In AbstractEventPipeline, CachingEventPipeling, NonCachingStreamPipeline.java:
> - Please use the same selector to do both lookup and release
> - Am not sure if all Components looked up are released.

Dispose is auto-magically taken care of.

Now regarding lookup() without release(), hopefully this is only done with
ThreadSafe Components like the ComponentSelector.  It is still not preferable.
If you call dispose() and the Component then releases it's hold on the components,
then that would be cool.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org