Carsten Ziegeler wrote:
> 
> > Berin Loritsch wrote:
> >
> > Carsten Ziegeler wrote:
> > >
> >
> > > > public interface SystemContext extends
> > > > org.apache.avalon.framework.context.Context {
> > > >     Source resolve(String uri);
> > > >     org.apache.cocoon.environment.Context getEnvironmentContext();
> > > >     Object get(Object key); // from Avalon context
> > > > }
> > > >
> > > > This removes the need for the SourceResolver interface to be
> > > > exposed or passed
> > > > as an argument to Components.  Components that do not need it or
> > > > use it will
> > > > have access to a simpler API.
> > > >
> > > The intention of this interface is very good, I like it, but
> > > I see one (more technical) problem here: the resolve() method
> > > is Environment or Request dependant. This means, if a component
> > > (e.g. the store) is contextualized at startup and gets the
> > > SystemContext, the resolving of resources must be done
> > > with the current environment in mind which might result in
> > > different resources.
> > > This resolving with respect to the current environment is
> > > of course necessary for all sitemap components (generators
> > > etc).
> > > If we get this working: +1
> >
> >
> > Ok, with that clarification, the resolve method would move to
> > RequestContext.
> >
> > > What do you mean with the org.apache.cocoon.environment.Context
> > > object? Is this the RequestContext mentioned below?
> >
> > No, that is the equivalent of the ServletContext.  It is global in scope,
> > and only a few components _really_ need it.  If you need it, extend
> > Contextualizable, and cast the Context to SystemContext.
> >
> Sorry, I was not very clear here:
> I meant the object returned getEnvironmentContext().

That's what I thought you meant.  getEnvironmentContext() returns the
same object as get(CONTEXT_OBJECT); on objectModel now.  It is a global
concern, not a request specific concern.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to