You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@sundn.de> on 2001/06/22 12:37:21 UTC

[C2]: Environment and ComponentManager

Hello,

I again and again face the big problem that the Environment cannot
get any components as it does not have access to the ComponentManager.

Is there any chance to make some simple changes that the Environment
gets a ComponentManager from somewhere? Or is this bad design?
(By the way: As far as I see it now this would help alot in implementing the
cocoon: url).

Suggestions? Comments?

Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: AW: [C2]: Environment and ComponentManager (and the cocoon: url)

Posted by giacomo <gi...@apache.org>.
On Fri, 22 Jun 2001, Carsten Ziegeler wrote:

> > Carsten Ziegeler wrote:
> >
> > Hello,
> >
> > I again and again face the big problem that the Environment cannot
> > get any components as it does not have access to the ComponentManager.
> >
> > Is there any chance to make some simple changes that the Environment
> > gets a ComponentManager from somewhere? Or is this bad design?
> > (By the way: As far as I see it now this would help alot in
> > implementing the
> > cocoon: url).
> >
> > Suggestions? Comments?
> >
> Ok, after a little bit more thinking, I could imagine the following
> solution (which is actually a little hack):
> - The SourceResolver (which is currently the environment) implements
>   some of the Avalon Interfaces (Composable, Disposable).
> - As the SourceResolver cannot be instantiated by Avalon (or the
>   ComponentManager) - remember this is the current Environment -
>   these methods (compose() etc.) have to be called by the sitemap
>   when the environment is processed.
>
> With this hack the SourceResolver has access to the component
> manager and can there access any configured components, e.g.
> the URLFactory class or the EventPipelines.

I don't know if it is a hack or not. Makeing the sitemap responsable to
take care of life cycle interfaces of the passed in Environment object
sound interesting.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: [C2]: Environment and ComponentManager (and the cocoon: url)

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Carsten Ziegeler wrote:
> 
> Hello,
> 
> I again and again face the big problem that the Environment cannot
> get any components as it does not have access to the ComponentManager.
> 
> Is there any chance to make some simple changes that the Environment
> gets a ComponentManager from somewhere? Or is this bad design?
> (By the way: As far as I see it now this would help alot in 
> implementing the
> cocoon: url).
> 
> Suggestions? Comments?
> 
Ok, after a little bit more thinking, I could imagine the following
solution (which is actually a little hack):
- The SourceResolver (which is currently the environment) implements
  some of the Avalon Interfaces (Composable, Disposable).
- As the SourceResolver cannot be instantiated by Avalon (or the
  ComponentManager) - remember this is the current Environment -
  these methods (compose() etc.) have to be called by the sitemap
  when the environment is processed.

With this hack the SourceResolver has access to the component 
manager and can there access any configured components, e.g.
the URLFactory class or the EventPipelines.

Any other thoughts on this?

Carsten
> Carsten
> 
> Open Source Group                        sunShine - b:Integrated
> ================================================================
> Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> www.sundn.de                          mailto: cziegeler@sundn.de
> ================================================================
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org