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

<snip>

Also, the node is setup so that there are several ways to provide the
> details of the composite/contributions that it needs (this is what started
> this off on the user list). When I say that the node is configured via an
> atom feed what this means is that the node reads the URL of the composite to
> run and the contributions that requires from and atom feed. It then uses
> these URLs to go get the composite/contributions in question. You can
> provide these URLs directly without using the feed. For example, I updated
> the validation tests, e.g  [1], to make the latest node read from the file
> system. No domain  manager involved. Here's the code...
>
> SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
> node = nodeFactory.createSCANode(new
> File("src/main/resources/DuplicateComponentName/Calculator.composite").toURL().toString(),
>                                                       new
> SCAContribution("TestContribution",
>
>                                                                       new
> File("src/main/resources/DuplicateComponentName").toURL().toString()));
> node.start();
> calculatorService = ((SCAClient)node).getService(CalculatorService.class,
> "CalculatorServiceComponent");
>
> So a little bit more complicated that what we have in host-embedded. The
> parameters to this version of createSCANode are
>
> URL to composite
> List of Contributions (each having a URI and a URL)
>
> I quite like this very explicit specification but we could add the helper
> method back in so, for sample running, we could do something like
>
> node =
> SCANode2Factory.createSCANodeWithComposite("DuplicateComponentName/Calculator.composite");
>
>
So what are the pros and cons of using SCANode2Factory versus the old
SCADomain in the host-embedded module? Does SCANode2Factory give any
enhanced functionality? Which one should we be looking at using for new and
future work?

   ...ant

Reply via email to