avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [RT] Is Poolable Harmful?
Date Mon, 07 Jan 2002 14:17:38 GMT
Michael McKibben wrote:

>>>interface Resettable extends SingleThreaded
>>>     void reset();
> How is this different from Recyclable.recycle()? 

It is more semantically correct--and it is not associated with the Pool.

> On a different subject, why does ComponentManager/ComponentSelector (et
> al) require Component and not just return/use Object? The reason why I ask
> is that a lot of interfaces do not extend from Component (for example the
> excalibur DataSource interface) and it looks awkward to see:

Because it is not an ObjectManager, but a ComponentManager.

> DataSource ds = (DataSource)cm.lookup(DataSource.ROLE);
> ...
> cm.release((Component)ds);
> Having to cast my interface to Component is a useless step and makes my
> code look ugly :)

I will alter the work interface for DataSource to extend Component--making
that cast no longer necessary.


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

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

View raw message