avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Optional Dependencies
Date Wed, 10 Jul 2002 10:26:06 GMT
On Wed, 10 Jul 2002 20:14, Carsten Ziegeler wrote:
> Peter Donald wrote:
> > > Hmmm, I'm not sure if this is a good feature - because an optional
> > > dependency means it's - well - optional. And I see two use cases
> > > their:
> > > a) The optional component is only used if it is available
> >
> > thats the usecase I had in mind.
> >
> > > b) The optional component is used only in some circumstances
> >
> > That is the usecase that I originally liked but Berin jumped on
> > me back in ye
> > old days for it. Then we both jumped on Fede (one of the original avalon
> > developers).
> >
> > Whats everyone else think. Should optional dependencies be "optional"
> > depending on the presence of some attribute (be it config variable or
> > something).
> >
> > Or should it be the assemblers decision, ie If they provide the
> > component then
> > it is used else it is not.
> I think the XSLTProcessor is a good example for a use-case of b).
> A store is available in (nearly) every system, so this component is
> always present. If we only have use-case a), then the XSLTProcessor
> always uses the store for caching stylesheets.

true but thats only true in the container where there is no such thing as an 
assembler. ECM has a global namespace for components where as other 
containers may or may not have this but even so...

Just because you aquire a service does not mean you have to use it. ie You can 
aquire service but only use it in certain locations. One of which may be you 
only use it if a flag is true or similar (Similar to how I implemented it in 

It is unfortunate that ECMs lookup is costly. Does Fortresss have this problem 
aswell? Most containers I work with are little more than a hashlookup.


Peter Donald
| We shall not cease from exploration, and the |
|  end of all our exploring will be to arrive  |
|  where we started and know the place for the |
|            first time -- T.S. Eliot          |

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