You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Laurent Perez <ha...@gmail.com> on 2006/09/13 10:01:11 UTC

Lifecycle of components thru Spring ?

Hello

Whenever I access cocoon2.2 beans via context.getBean(component.ROLE),
do I have to respect a few lifecycle contracts, like
release(component) like I used to do with cocoonComponentManager under
2.1, perhaps something like calling bean destroy() method once I'm
done with them, and init() them back later ?

I'm worrying about letting unused components fill up my memory space,
unless of course the new container cleanups everything in the
background.

Thanks !

laurent

-- 
<a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com
- Mobile world, technology and more</a>

Re: Lifecycle of components thru Spring ?

Posted by Laurent Perez <ha...@gmail.com>.
> Cocoon does this for you - for thread safe components this isn't a
> problem anyway. We create proxies for poolable/recyclable components
> which should handle the calls to recycle etc.

Amazing, thanks! :)

laurent

-- 
<a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com
- Mobile world, technology and more</a>

Re: Lifecycle of components thru Spring ?

Posted by Carsten Ziegeler <cz...@apache.org>.
Laurent Perez wrote:
> Hello
> 
> Whenever I access cocoon2.2 beans via context.getBean(component.ROLE),
> do I have to respect a few lifecycle contracts, like
> release(component) like I used to do with cocoonComponentManager under
> 2.1, perhaps something like calling bean destroy() method once I'm
> done with them, and init() them back later ?
No :)

> 
> I'm worrying about letting unused components fill up my memory space,
> unless of course the new container cleanups everything in the
> background.
> 
Cocoon does this for you - for thread safe components this isn't a
problem anyway. We create proxies for poolable/recyclable components
which should handle the calls to recycle etc.

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/