You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ole Hildebrandt <ol...@web.de> on 2004/06/08 11:34:07 UTC
Action Pooling
Hi,
I wrote my own Action extending AbstractAcion. I configured it in the
sitemap like this;
<map:action name="dispatchaction" pool-min="4" pool-grow="4"
pool-max="20" src="de.test.cocoon.DispatcherAction"/>
Exploring the Logs i found out that the Action is not Pooled:
http-8081-Processor25/DefaultComponentFactory: ComponentFactory creating
new instance of de.test.cocoon.DispatcherAction.
http-8081-Processor25/DefaultComponentFactory: ComponentFactory
decommissioning instance of de.test.cocoon.DispatcherAction.
Is there something I forgot? Do i have to implement a certain interface
or configure pooling somewhere else?
Thanks for any suggestions
Ole
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Action Pooling
Posted by Jorg Heymans <jh...@domek.be>.
Not sure why you decided to extend AbstractAction, there is the Action
interface as well.
My actions are usually declared as
....
extends AbstractLogEnabled
implements Action, Serviceable, ThreadSafe
HTH
Jorg
Ole Hildebrandt wrote:
> Hi,
>
> I wrote my own Action extending AbstractAcion. I configured it in the
> sitemap like this;
>
> <map:action name="dispatchaction" pool-min="4" pool-grow="4"
> pool-max="20" src="de.test.cocoon.DispatcherAction"/>
>
> Exploring the Logs i found out that the Action is not Pooled:
>
> http-8081-Processor25/DefaultComponentFactory: ComponentFactory creating
> new instance of de.test.cocoon.DispatcherAction.
> http-8081-Processor25/DefaultComponentFactory: ComponentFactory
> decommissioning instance of de.test.cocoon.DispatcherAction.
>
> Is there something I forgot? Do i have to implement a certain interface
> or configure pooling somewhere else?
>
> Thanks for any suggestions
>
> Ole
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Action Pooling
Posted by "Rui Alberto L. Gonçalves" <ru...@ptinovacao.pt>.
AFAIK, Action interface is designed so that implementations can be
ThreadSafe, reducing memory usage. Note that AbstractAction is
a Action. But if you really want your component to be Poolable
you must implement interface org.apache.avalon.excalibur.pool.Poolable
To mark you component as ThreadSafe, your action must implement
interface org.apache.avalon.framework.thread.ThreadSafe.
Hope this helps,
Rui
On Tue, 2004-06-08 at 10:34, Ole Hildebrandt wrote:
> Hi,
>
> I wrote my own Action extending AbstractAcion. I configured it in the
> sitemap like this;
>
> <map:action name="dispatchaction" pool-min="4" pool-grow="4"
> pool-max="20" src="de.test.cocoon.DispatcherAction"/>
>
> Exploring the Logs i found out that the Action is not Pooled:
>
> http-8081-Processor25/DefaultComponentFactory: ComponentFactory creating
> new instance of de.test.cocoon.DispatcherAction.
> http-8081-Processor25/DefaultComponentFactory: ComponentFactory
> decommissioning instance of de.test.cocoon.DispatcherAction.
>
> Is there something I forgot? Do i have to implement a certain interface
> or configure pooling somewhere else?
>
> Thanks for any suggestions
>
> Ole
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
--
Rui Alberto L. Gonçalves <ru...@ptinovacao.pt>
PT Inovação
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org