avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Gaspar" <paulo.gas...@krankikom.de>
Subject RE: Divergence from Avalon (was Re: [RT] Is Poolable Harmful?)
Date Fri, 11 Jan 2002 15:08:31 GMT
Hi again, just a couple of tiny remarks...

> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Friday, January 11, 2002 3:21 PM
> 
> 
> On Sat, 12 Jan 2002 00:44, Berin Loritsch wrote:
> > Peter Donald wrote:
> > > On Fri, 11 Jan 2002 02:26, Berin Loritsch wrote:
> > >>>BTW, do we dump the Component interface?
> > >>
> .......................
> >
> > 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?
> 
> I think thats a different issue. Marker interfaces are one option, 
> declarations in a descriptor file is another better option (but more 
> heavyweight) and manifest entries seem a bit crusty to me ;)

A method in a custom component factory is another, as described in 
my other post.


> However I don't think we should have an interface named Component 
> that has a 
> release method or anything similar. If you really need such a generic 
> interface (though I am not so sure about that) then name it Releasable or 
> something similar.
> 
> However I only think that this sort of functionality works on "shallow" 
> components. For instance pooled JDBC connections are a good 
> example (not sure 
> if this is how excaliburs pool works but ...). Most of the 
> methods just store 
> a little bit of state and then directly delegate to the "real" connection.
>
> When you do close it will release all the resources in "real" 
> connection then 
> null out the real connection. Thus any attempt to reuse that particular 
> connection (which is just a lightweigh facade) will fail.

That is exactly how my implementation and others work.
=:o)

  
> I think that is the only case where a component should be allowed 
> to have a 
> close()/release() method actually mean "return me to pool". In 
> other cases I 
> think it should be up to the user to replace the component or 
> optionally a 
> "transaction" of components (like described in other mail" could be used.
> 
> -- 
> Cheers,
> 
> Pete
> 
> "The ability to quote is a serviceable substitute for wit." -- Maugham

You sure have a good source of quotes!


Have fun,
Paulo Gaspar


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message