You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Ole Bulbuk <Ol...@ebp.de> on 2002/04/12 19:26:42 UTC

AW: ExcaliburComponentManager.hasComponent() and Context

Hi Berin,

> Do you have an older version of ECM in your classpath somewhere?  That
> *used* to be how hasComponent() was implemented--but that has changed.

Its sad but true. I used the right version for compiling, etc.
But Phoenix redefined the extension class path in its run.sh-script!!!
Now it all makes much more sense. :-)))

Thanks alot for the hint!


But I do have new questions now:

I would like a composable to pass some objects to its subcomponents. I
always thought this would be what a Context is good for. But there doesn't
seem to be any way to fill the context when a component manager is used.
In the Composable interface I miss a method like:
void setContext(String role, Context context);

This method could be called by the component manager automatically and
everything would be fine.

Is there any other way to give objects to subcomponents (preferably before
they are started)?

How could I create a "component network" like this:

                 subComponent1
                /             \
 masterComponent               subSubComponent
                \             /
                 subComponent2


Any help would be appreciated.

Thanks,

Ole
-- 
Ole Bulbuk              Tel.:   0331/74759/60
Ernst Basler + Partner  Fax:    0331/74759/90
Tuchmacherstr. 47       E-Mail: mailto:ob@ebp.de
14482 Potsdam           WWW:    http://www.ebp.de

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AW: ExcaliburComponentManager.hasComponent() and Context

Posted by Berin Loritsch <bl...@apache.org>.
Ole Bulbuk wrote:
> Hi Berin,
> 
> 
> But I do have new questions now:
> 
> I would like a composable to pass some objects to its subcomponents. I
> always thought this would be what a Context is good for. But there doesn't
> seem to be any way to fill the context when a component manager is used.
> In the Composable interface I miss a method like:
> void setContext(String role, Context context);
> 
> This method could be called by the component manager automatically and
> everything would be fine.
> 
> Is there any other way to give objects to subcomponents (preferably before
> they are started)?
> 
> How could I create a "component network" like this:
> 
>                  subComponent1
>                 /             \
>  masterComponent               subSubComponent
>                 \             /
>                  subComponent2
> 
> 
> Any help would be appreciated.


:/  That's not a normal hierarchy.  You have to use a Container
Hierarchy.  Currently ECM doubles as a Container, which is confusing.
Fortress will fix that when it is done.

THe hierarchy would look like this:

rootCOntainer/MasterComponent
     |
     |        subComponent1
     |       /
SubConatiner
     |       \
     |        subComponent2
     |
SubSUbContainer/subsubComponent


Each set of components managed at each level would have a unique
Context.  In fact, you can design your container to have a separate
Context for each component.

If you were to attempt a hierarchy like the one you presented,
in reality it would look like this:

                 subCOmponent1-subSubComponent
                /
masterComponent
                \
                 subComponent2-subSubComponent

IOW, a duplicate subSubComponent for each branch.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>