cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Is it possible to have poolable actions ?
Date Tue, 10 Feb 2004 17:22:26 GMT
Jorg Heymans wrote:

> You implement marker interface <<Poolable>>


Some additional information: although it is right that you have to 
implement Poolable for a class to be pooled, this is most often 
unnecessary for Actions.

The reason is that Poolable is useful *only* for components that do have 
a state that cannot be shared between uses of that components. Actions 
have a single act() method and therefore 99% of them are stateless, and 
consequently implement ThreadSafe.

AFAIK, XMLFormAction is the *nly action in Cocoon that is not ThreadSafe.

The effect of implementing ThreadSafe is that only one instance of the 
class will be used for all requests, which is far speedier than managing 
a pool of objects.

My 0.02 euro.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



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


Mime
View raw message