You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Orhan Aksoy <oa...@gmail.com> on 2010/09/01 15:34:23 UTC

calculator-scaclient example

Hi all,

I cannot get the calculator-scaclient example to run. Here's what I have
tried:

To run the sample, first I start the contribution-calculator.

> cd tuscany-sca-2.0-M5\samples\binding-sca\contribution-calculator
> mvn tuscany:run

Then, I see the [INFO] logs, and at the end, I see

SCA API ClassLoader: org.codehaus.classworlds.RealmClassLoader@b8bef7
3 + 2=5.0
3 - 2=1.0
3 * 2=6.0
3 / 2=1.5
[INFO] Ctrl-C to end...


Then I run the sca client

> cd tuscany-sca-2.0-M5\samples\calculator-scaclient
> mvn exec:java

After the CalculatorService.add(2, 3) call, the program blocks for a few
seconds, then I get the connection lost message.
The output is as follows:

[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building Apache Tuscany SCA Sample Calcualtor SCAClient
[INFO]    task-segment: [exec:java]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
[INFO] [exec:java {execution: default-cli}]
using domain uri: default
using name: world
Calling CalculatorService.add(2, 3)
01.Eyl.2010 16:32:13 com.hazelcast.client.ConnectionManager
destroyConnection
WARNING: Connection to Connection [0] [10.152.0.94/10.152.0.94:14820] is
lost
5.0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Sep 01 16:32:13 EEST 2010
[INFO] Final Memory: 10M/24M
[INFO]
------------------------------------------------------------------------

Thanks In Advance,

Orhan

Re: calculator-scaclient example

Posted by ant elder <an...@gmail.com>.
On Wed, Sep 1, 2010 at 2:34 PM, Orhan Aksoy <oa...@gmail.com> wrote:
> Hi all,
>
> I cannot get the calculator-scaclient example to run. Here's what I have
> tried:
>
> To run the sample, first I start the contribution-calculator.
>
>> cd tuscany-sca-2.0-M5\samples\binding-sca\contribution-calculator
>> mvn tuscany:run
>
> Then, I see the [INFO] logs, and at the end, I see
>
> SCA API ClassLoader: org.codehaus.classworlds.RealmClassLoader@b8bef7
> 3 + 2=5.0
> 3 - 2=1.0
> 3 * 2=6.0
> 3 / 2=1.5
> [INFO] Ctrl-C to end...
>
>
> Then I run the sca client
>
>> cd tuscany-sca-2.0-M5\samples\calculator-scaclient
>> mvn exec:java
>
> After the CalculatorService.add(2, 3) call, the program blocks for a few
> seconds, then I get the connection lost message.
> The output is as follows:
>
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Apache Tuscany SCA Sample Calcualtor SCAClient
> [INFO]    task-segment: [exec:java]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing exec:java
> [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
> [INFO] [exec:java {execution: default-cli}]
> using domain uri: default
> using name: world
> Calling CalculatorService.add(2, 3)
> 01.Eyl.2010 16:32:13 com.hazelcast.client.ConnectionManager
> destroyConnection
> WARNING: Connection to Connection [0] [10.152.0.94/10.152.0.94:14820] is
> lost
> 5.0
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Wed Sep 01 16:32:13 EEST 2010
> [INFO] Final Memory: 10M/24M
> [INFO]
> ------------------------------------------------------------------------
>
> Thanks In Advance,
>
> Orhan
>

That is actually working. If you look closely in the output you'll see
the line with "5.0" which is the expected result from the calculator
service of adding 2 and 3.

The output does get lost amongst that connection lost WARNING message
which can be ignored, its coming from Hazelcast and the message will
stop appearing when Tuscany updates to a more recent hazelcast
release.

   ...ant