Hi Simon,
I did the following

Host 1:
ant runDomain

Host 2:
I modified in my case the NodeB launcher to run in the remote location. I
get an exception because it can find the artefacts

ant runDomain
ant runNodeB

     [java] INFO: Loading contribution:
file:/Users/me/java/tuscany-sca-1.2.1-incubating/samples/calculator-distributed/./src/main/resources/nodeB/
     [java] 22/07/2008 09:21:53
org.apache.tuscany.sca.node.launcher.NodeLauncherUtil node
     [java] SEVERE: SCA Node could not be created
     [java] java.lang.reflect.InvocationTargetException
     [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
     [java] at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     [java] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     [java] at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
     [java] at
org.apache.tuscany.sca.node.launcher.NodeLauncherUtil.node(NodeLauncherUtil.java:297)
     [java] at
org.apache.tuscany.sca.node.launcher.NodeLauncher.createNode(NodeLauncher.java:60)
     [java] at
org.apache.tuscany.sca.node.launcher.NodeLauncher.main(NodeLauncher.java:109)
     [java] at
node.LaunchCalculatorNodeB.main(LaunchCalculatorNodeB.java:26)
     [java] Caused by: org.osoa.sca.ServiceRuntimeException:
java.io.FileNotFoundException:
/Users/me/java/tuscany-sca-1.2.1-incubating/samples/calculator-distributed/./src/main/resources/nodeB
(No such file or directory)

This directory is present on the remote domain (host 1)

ls
/Users/me/java/tuscany-sca-1.2.1-incubating/samples/calculator-distributed/./src/main/resources/nodeB
8 Calculator.composite 0 META-INF/

What else  am I missing?

Cheers,
Malte.

On Mon, Jul 21, 2008 at 9:20 PM, Simon Laws <[EMAIL PROTECTED]>
wrote:

>
>
> On Mon, Jul 21, 2008 at 9:40 AM, Malte Marquarding <
> [EMAIL PROTECTED]> wrote:
>
>> Hi,
>> Thanks that works.
>>
>> Does that mean you are running two domains? This is exactly what I
>> stumbled over. I remote domain manger would certainly be good.
>>
>> Cheers,
>> Malte
>>
>>
>> On Mon, Jul 21, 2008 at 3:06 PM, Luciano Resende <[EMAIL PROTECTED]>
>> wrote:
>>
>>> The calculator-distributed already runs in multiple VM. Let me
>>> describe the steps I had to do in order to run the sample in two
>>> different machines.
>>>
>>> In one of the machine, I ran NodeB and NodeC by doing the following :
>>>
>>> ant runDomain
>>> ant runNodeB
>>> ant runNodeC
>>>
>>> In the other machine, I ran NodeA that would connect to the remote
>>> nodes (nodeB and NodeC). I have to modify the node composites, to
>>> properly identify the remote uri for the nodes as follow :
>>>
>>>   <component name="NodeB">
>>>        <t:implementation.node uri="nodeB" composite="s:CalculatorB"/>
>>>        <service name="Node">
>>>            <binding.sca uri="http://tuscany1.domain.com:8200"/>
>>>        </service>
>>>    </component>
>>>
>>>     <component name="NodeC">
>>>                <t:implementation.node uri="nodeC"
>>> composite="s:CalculatorC"/>
>>>                <service name="Node">
>>>                        <binding.sca uri="http://tuscany1.domain.com:8300
>>> "/>
>>>                </service>
>>>        </component>
>>>
>>> Then I ran nodeA :
>>>
>>> ant runDomain
>>> ant runNodeA
>>>
>>>
>>> The only thing I'm not sure is how I would tell the node to connect to
>>> a remote domain manager, that would simplify the steps to run nodeA.
>>>
>>>
>>> On Sun, Jul 20, 2008 at 6:41 PM, Malte Marquarding
>>> <[EMAIL PROTECTED]> wrote:
>>> > Hi,
>>> > any takers? I tried the API docs, but they are outdated - JIRA
>>> submitted and
>>> > trying to build from source.
>>> > Cheers,
>>> > Malte
>>>
>>>
>>>
>>> --
>>> Luciano Resende
>>> Apache Tuscany Committer
>>> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
>>> http://lresende.blogspot.com/
>>>
>>
>>
> Hi
>
> In the case of samples/calculator-distributed the node launchers are hard
> coded to talk to the domain at "http://localhost:9990";. If you look in
> each of the node launcher classes you will see lines like...
>
>  NodeLauncher.main(new String[] {"http://localhost:9990/node-config/NodeC
> "});
>
> To run the domain in a remote location change the localhost here to the
> host where the domain is running or write some launcher code that takes this
> URL as a parameter.
>
> The launcher for nodeA is slightly different from the launchers for B and C
> in that it goes on to make the test calls but in all these cases it wouldn't
> be hard to change to accept the domain configuration URL as a command line
> argument. If you decide to give this a go make a patch and we can update the
> sample.
>
> Regards
>
> Simon
>
>

Reply via email to