On Wed, Apr 30, 2008 at 1:18 PM, Simon Laws <[EMAIL PROTECTED]>
wrote:

> snip....
>
> >
> > Cool thats really helpful. Ok so if we can have a Tomcat TuscanyHost
> > (i.e.
> > an extension of org.apache.catalina.core.StandardHost not related to the
> > Tuscany host stuff)  that will get its addChild method called for each
> > webapp and we can get a File to the root of the webbapp so call
> > nodeFactory.createSCANode with that and treat each webapp as a seperate
> > contribution which seems reasonable. That would give us a node per
> > webapp
> > which i'm not sure is good or bad till theres some answers to the "what
> > is a
> > node" question.
>
>
> sounds ok to me.
>
>
> >
> >
> > How do nodes talk to each other or become part of a bigger domain?
> > Theres
> > nothing in SCANode2Factory.newInstance().createSCANode or node.start
> > that
> > mentions anything about any domain?
> >
> >   ...ant
> >
>
> They don't talk to each other, other other than at the application level.
> If you want to have a node read it's configuration from the domain you can
> use the
> following factory method.
>
> public abstract SCANode2 createSCANode(String configurationURI);
>
> and provide the URI of the configuration that you want it to read. e.g.
>
> node = factory.createSCANode("http://localhost:9990/node-image/NodeA";);
>
> This URL is provided by the domain and is tailored specifically to provide
> just the right configuration (the list of composite and contribution URLs)
> for the node in question. NodeA in this case.
>
> Simon
>
>
Ok I've been digging around in the code a bit and think i understand that,
but it will only work if there are pre-existing  .composite files describing
each node when the domain starts up, right? Eg like the NodeA.composite,
NodeB.composite etc in the calculator-distributed sample.

This is not quite what we need in the Tomcat case. I shouldn't need to write
a NodeX.composite file for each webapp as we can say each webapp is a node,
use the webapp name for the node name, and use the webapps
meta-inf/sca-deployables or sca-contribution.xml to get all the composites.

So i guess what i want is for the TuscanyStandardHost to start up an inial
empty domain, then as each webapp is discovered to get the domain to create
itself a node configuration from the webapp folder, and then have the
TuscanyStandardHost call domain.createNode for the webapp and store that
node in the webapps context.

Does that sound reasonable? There doesn't seem to be APIs for that right now
so if this approach sounds ok id like to try to add that.

   ...ant

Reply via email to