You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Justin Fagnani-Bell <ju...@paraliansoftware.com> on 2003/11/04 23:58:48 UTC

Component getting recycled too early!

Hey list,

   What causes a component to be recycled? I have a pipeline with an 
Action and Generator that are tightly integrated. I'm trying to get 
them to share a DB access component. The idea is that the Action will 
load it from the component manager, initialize it (mainly setting the 
user to use to access the database), use it to to some DB stuff, then 
put it in the object model so that the Generator can use it.

The problem is that when act() is done the component is recycled, and I 
loose all the initialization.

Is there anyway I can ensure that my Action and Generator use the same 
instance and that it isn't recycled until the Generator is done?

I thought the component manager would act like a garbage collector and 
not recycle the if it's reference count was > 0. I guess not. Can I 
tell the CM to not release the component and then manually release it?

Thanks a lot,
   Justin


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