Peter Donald wrote:

> On Fri, 11 Jan 2002 02:26, Berin Loritsch wrote:
> 
>>>BTW, do we dump the Component interface?
>>>
>>I think that is the general consensus.  However I do have one more use for
>>it:
>>
>>If we move the release() method from ComponentManager, and place it in the
>>Component interface, then Components that require releasing because they
>>are pooled have a mechanism to do so.  That policy should be decided by the
>>work interface.  For example: a component that extends ContentHandler
>>cannot be threadsafe, so it would implement the Component interface--but a
>>component that does not need to be pooled by virtue of the work interface
>>would not implement the Component interface.
>>
> 
> I think it should be solely up to the work interface to release the component 
> if the component is actually just a shallow facade ontop of a real resource. 
> For instance close() when used on a JDBC connection would place the real 
> underlying resource back in pool. Similar methods will be used with other 
> resources/components but I don't think we should have a Component interface 
> provide such a method.


Ok.  I was also thinking of how to provide a hint to the Container that the
Component needed to be pooled.

How do you propose that we address the issue of programatically providing the
hint that a Component is pooled.  Is this something we have to do with the
Manifest file?  What is the proper method in your mind?


It is easy to deal with Components that implement a marker interface when that

interface has semantic meaning that is understood.  That is why the ThreadSafe
and SingleThreaded interfaces are currently useful.  If we remove the marker
interfaces, we have to replace them with some other method.

The critical thing we have to address is whether a Component should be unique
to each lookup, or whether the same instance can be used accross all lookups.
Cocoon has proven unequivacably that pooling Components provides a serious boost
in runtime performance and scalability.  Furthermore, the cost of synchronizing
access to critical sections of logic in a Component is cheaper than pooling.

That is why this lifestyle aspect is so important.




-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


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

Reply via email to