...snip
>
> Yes i'm thinking that a domain directory is for one node, so that would be:
>
>  /some/path/to/a/directory/domain1/
>    node.xml
>  /some/path/to/a/directory/domain2/
>    node.xml
>
> and used with:
>
> node1 = TuscanyRuntime.createNode(new
> File("/some/path/to/a/directory/domain1"));
> node2 = TuscanyRuntime.createNode(new
> File("/some/path/to/a/directory/domain2"));
>
> As opposed to:
>
>  /some/path/to/a/directory/
>    domain1.node.xml
>    domain2.node.xml

I was more thinking of

 /some/path/to/a/directory/domain1
    node1.node.xml
    node2.node.xml

I.e. multiple nodes in the same domain. So you collect the whole set
of domain contributions in a directory and then just specify what runs
where. I of course recognize that you could partition the domain
having a directory per node which is also fine.

>
> but that also works and is useable with:
>
> node1 = TuscanyRuntime.createNode(new
> File("/some/path/to/a/directory/domain1.node.xml"));
> node2 = TuscanyRuntime.createNode(new
> File("/some/path/to/a/directory/domain2.node.xml"));
>
> Does that do what you want?

I think the API is OK but i would rephrase the example as:

 node1 = TuscanyRuntime.createNode(new
File("/some/path/to/a/directory/domain1/node1.node.xml"));
 node2 = TuscanyRuntime.createNode(new
File("/some/path/to/a/directory/domain1/node2.node.xml"));

to highlight that two different nodes are associated with the same
domain. Your scenario of having two nodes working in different domains
is of course valid but I don't see the need to share the same
directory of domain contributions in that case

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to