On Tue, 3 Dec 2002 11:34 am, Peter Donald wrote:
> On Tue, 3 Dec 2002 11:46, Adam Murdoch wrote:
> > Could someone explain why the distinction between resources provided by
> > the container and resources not provided by the container is important
> > *to the component* itself?  Why does it care?  And if it does, why is it
> > useful that the component should use one mechanism for looking up one
> > group of resources, and a different mechanism for looking up the others
> > (and presumably separate mechanisms to describe to the container the
> > resources it is expecting)? Ignore the fact that some resources are
> > passive, immutable 'data' and other resources are active 'services' -
> > that's a separate distinction.
>
> Take this to it's logical end. Why use different mechanisms for looking up
> different types of resources in any component? ie Why do loggers have their
> own lifecycle interface? Could not you just look up the Logger this
> directory? Or why don't you just lookup the Configuration object in this
> directory? Is this not what JNDI is - so why not use that instead of our
> own mechanisms?

That's not what I asked.  From the component's POV, the distinction between, 
say, configuration and a logger, is clear.  I wasn't asking why is it useful 
to separate groups of resources that have clear and distinct meanings to the 
component.  I don't need convincing it's a good thing (who does?).  But 
there's a tension there - cut things too finely and you're just creating 
pointless extra work for everyone.  Same for cutting in the wrong spots.

Hence my question:  Does the component *really* care whether a particular 
resource is provided by the container or not provided by the container?  Is 
this an artificial distinction?  Why is it useful to the component writer to 
split them?

> So why separate out container provided resources and peer provided
> resources? Mainly as they follow different usage patterns.

Can you give a little more detail?  Aren't the 'different usage patterns' due 
to the fact that framework *right now* makes such a distinction and splits 
the container and not-container provided resources across Context and 
ServiceManager?

-- 
Adam

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

Reply via email to