On 7/16/07, ant elder <[EMAIL PROTECTED]> wrote:



On 7/16/07, Simon Laws <[EMAIL PROTECTED]> wrote:
>
>
>
> On 7/16/07, ant elder < [EMAIL PROTECTED]> wrote:
>
> >
> >
> > On 7/16/07, Simon Laws < [EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > On 7/16/07, ant elder < [EMAIL PROTECTED]> wrote:
> > > >
> > > > Thanks, that helps a lot, couple of followup questions:
> > > >
> > > > On 7/16/07, Simon Laws < [EMAIL PROTECTED] > wrote:
> > > >
> > > > <snip>
> > > >
> > > >  At the moment the application domain has a components list that
> > > > > is populated when the domain is activated.
> > > > >
> > > >
> > > > I can't find where this is happening, thats calling the
> > > > setComponentNode method on DefaultComponentRegistry right? Is that being
> > > > called right now?
> > > >
> > >
> > > The part I was talking about is in the following method in
> > > DistributeSCADomain (and also in EmbeddedSCADomain)
> > >
> > >         public void activateDomain() throws ActivationException {
> > >             CompositeActivator compositeActivator =
> > > runtime.getCompositeActivator();
> > >             compositeActivator.activate(domainComposite);
> > >             for (Component component : domainComposite.getComponents())
> > > {
> > >                 components.put(component.getName(), component);
> > >             }
> > >
> > > So the domain has a list of all of it's components.
> > >
> > > It would be relatively straighforward to make this list and/or the
> > > > > application domain itself known to the management components that 
require
> > > > > it.
> > > > >
> > > >
> > > > How are you thinking this would be done? If the management
> > > > components are just regular SCA components that would need some sort of 
new
> > > > property annotation wouldn't it, or are you thinking of just some sort 
of
> > > > static helper ComponentManager.getInstance() type of thing?
> > > >
> > >
> > > Excuse pseudo code but I was thinking something along the lines of
> > > the following code added to the activate processing.
> > >
> > > ComponentReguistry componentRegistry = nodeDomain.getService(
> > > ComponentRegistry.class, "ComponentRegistry");
> > >
> > > ...
> > >
> > > for (Component component : domainComposite.getComponents()) {
> > >         components.put(component.getName(), component);
> > >         componentRegistry.addComponentModel(component.getName(),
> > > component);
> > > }
> > >
> > > Not sure ComponentRegistry is the right management component for
> > > your purposes but you get the idea.
> > >
> > > I am concerned here that we rely on a component that had been
> > > declared in the ".node" file. Someone could come along and just delete if
> > > from that configuration file. What do we do then? Raise and error? Switch 
to
> > > non distributed mode?
> > >
> > > Anyhow there are a number of management components that we need to
> > > design, for example, these are the kinds of things we want to do;
> > >
> > > Set default URIs for Domain
> > > Allocate domain components to node
> > > Add/remove/update a contribution
> > > Add/remove/update a composite
> > > Start/Stop domain
> > > Start/stop component
> > > Query
> > > Events
> > >
> >
> > Some of this is starting to sound a little bigger than what
> > TUSCANY-1379 is about, i.e just start/stop/query running components.
> > So i'd like to start small with just that for now and see how it goes, and
> > we can look at adding the domain and node stuff as it progresses. To get
> > things going I've just committed a ComponentManager interface and updated
> > EmbeddedSCADomain to use that, its just rough start, anyone feel free to
> > chip in with any comments as I'm completely open to changing any aspect of
> > it. I'll now try to add something which actually uses it to start/stop
> > things and we can go from there...
> >
> >     ...ant
> >
> > But, from my point of view at least, it would be cool if it worked in
> the distributed case also. So what I will try and do is reflect your
> interfaces in exposed management components. Not suggesting I will cover
> everything you do but at least that way I can find out where the holes are
> as we move between standalone and distributed cases.


Agreed, so how could we make that happen more easily? What about as a
start if getComponentManager (or whatever it ends up being called) is
added to org.apache.tuscany.sca.host.embedded.SCADomain and then SCADomain
subclasses are able to override that implementing whatever is appropriate
for their environment?

   ...ant


Whats been discussed here in this thread is mostly in now. Any more comments
or suggestions from anyone?

  ...ant

Reply via email to