avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject are scopes in context keys a violation of IOC ?
Date Wed, 28 Aug 2002 09:44:46 GMT

Nicola Ken Barozzi wrote:

> Peter Donald wrote:
>> On Wed, 28 Aug 2002 07:28, Peter Donald wrote:
>>> Im not so sure it is to use "context" as the namespace -esepcially 
>>> given
>>> that these attributes are scoped. The way these three are named in 
>>> what I
>>> am doing is the following
>>> component:home.dir=
>>> component:work.dir=
>>> component:common.classloader=
>>> partition:home.dir=
>>> partition:work.dir=
>>> partition:common.classloader=
>>> application:home.dir=
>>> application:work.dir=
>>> application:common.classloader=
>> On second thoughts, "*:common.classloader" would clash with the ideas 
>> in some containers. Blech - maybe just X:classloader instead.
> I think that common.classloader is better, since it says that the 
> classloader can be shared, as Leo says. 

But is this a component decision?

It is the component that is declaring the requirement for a context 
value - I'm not sure I like the idea of a component saying to a 
container "I want a common classloader" - as opposed to a component 
declaring to a container that it wants a classloader.  It should be up 
to the container to build the classloader such that common classes are 
part of the classloader hierachy.

With every declaration of a context key that is recognized - we are 
expanding the defintion of component - and its something I'm currently 
struggling with.  If I were to ignore scopes for a moment and I imagined 
that a component declares that it needs a working directory - it should 
be the container that determines the working directory.  I'm struggling 
with the fact that in actual solutions we have in operation today - the 
container can manage scopes privately - the component does not need to 
know about this.  

Is the introduction of scopes a violation of IOC?
(I'm just thinking out loud again)

Cheers, Steve.


Stephen J. McConnell

digital products for a global economy

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