On Wed, 2002-04-10 at 16:31, Vadim Gritsenko wrote:
> > From: Nick Airey [mailto:[EMAIL PROTECTED]]
> > 
> > 
> > Hello everyone,
> > 
> > I have written some action classes, extending class
> > org.apache.cocoon.acting.AbstractAction and implementing the act()
> > method. They're working fine.
> > 
> > 
> > My questions refer to the Cocoon 2.0.2 release.
> > 
> > 
> > Question 1:
> > 
> > I can see from the generic sitemap.xmap that cocoon generators,
> > transformers and serializers can be pooled, with pooling parameters
> > being setup in the sitemap.xmap . Can action classes also be pooled? 
> 
> Only if Action implements Poolable interface. But I never have seen an
> example of Poolable action.
> 

Ok. AbstractAction doesn't implement Poolable (itself or in base
classes). So that explains why there are no examples of pooled actions
in the current sample sitemap.  Also, the Poolable interface is simply a
marker, so it is trivial to "make my action poolable". 

So I did a quick test by simply:

a) making my action implement Poolable, and
b) adding pool-max, pool-min, pool-grow to the sitemap definition


And it works.  :-)

(well, at least, it seems to work. I can see the pool being created, and
an element being retrieved as needed) My other actions are
created/destroyed every time.


So does anyone have any ideas why say AbstractAction isn't poolable?

I'll post this to cocoon-dev as well. 


Regs,
Nick.






> 
> > If
> > so, do I have to do something special to make pooling work on my own
> > action classes?
> 
> Implement Poolable.
> 
> 



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to