You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@infoplanning.com> on 2000/06/07 23:53:22 UTC

Conceptual Question

I have a conceptual question:

why is a NamedComponentManager not a ComponentManager?


Re: Conceptual Question

Posted by Ricardo Rocha <ri...@apache.org>.
Berin Loritsch wrote:
> 
> I have a conceptual question:
> 
> why is a NamedComponentManager not a ComponentManager?

This has been addressed and a fix is coming soon:

Stefano Mazzocchi wrote:

> Also, here is what I would change:
> 
> 1) move NamedComponent into org.apache.arch
> 2) remove org.apache.arch.named
> 3) add to ComponentManager
> 
>  public NamedComponent getComponent(String role, String name)
>  throws ComponentNotFoundException
> 
> 4) add to ComponentManager
> 
>  public Enumeration getComponents(String role)
>  throws ComponentNotFoundException
> 
> This should allow you to access components by "role" if only one
> component is required for a given role (usually database pools, objects
> stores, thread managers and such) or by "role and name" when there is
> the need to have several flavors of the same components.
> 
> NOTE:
> 
>  Enumeration getRoles()
> 
> is avoided on purpose, since it imposes a little stronger typing between
> configurations and component usages. A component should _NOT_ know the
> existance of other components unless it is _designed_ to know them
> (thus, to know their roles).