That makes sense. Thanks for the reply. My follow-up question is regarding
the composite file in the user's guide on the Tuscany website regarding the
calculator example.

In the file:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
           name="Calculator">

        <service name="CalculatorService"
promote="CalculatorServiceComponent/CalculatorService">
                <interface.java interface="calculator.CalculatorService"/>
                <binding.jsonrpc/>
        </service>    

        <component name="CalculatorServiceComponent">
                <implementation.java
class="calculator.CalculatorServiceImpl"/>
                <reference name="addService" target="AddServiceComponent" />
        </component>

        <component name="AddServiceComponent">
                <implementation.java class="calculator.AddServiceImpl"/>
        </component>
    
</composite>

In this example, in the first service, they promote
CalculatorServiceComponent/CalculatorService, but when I run the project, I
get the following error: 

Promoted component service not found:
CalculatorServiceComponent/CalculatorService null

Am I missing something here? In the promote, I see it refers to the
CalculatorServiceComponent, but I don't see where the CalculatorService
comes from following that.

Also, am I correct is saying what it is trying to do is expose the
CalculatorServiceComponent as a Service on the Composite?

Thanks again.

-Jason
 
 
 
############################################################################
############################################################################
#########
This electronic mail transmission contains confidential information intended
only for the person(s) named. Any use, distribution, copying or disclosure
by another person is strictly prohibited.
############################################################################
############################################################################
#########

-----Original Message-----
From: Raymond Feng [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 12, 2007 12:50 PM
To: tuscany-user@ws.apache.org
Subject: Re: Promote?

Hi,

A SCA composite can be used as an implementation (implementation.composite) 
for a component. This is so-called recursive composition. It allows 
pre-assembled composites to be reused.

"promote" can be used to make services or references declared on a component

inside the composite visible for wiring at the composite level. The 
composite services and references can be then further configured when it's 
used as a component implementation at outer level.

Hope the following samples help.

<composite name="Composite1" xmlns:ns="http://dummy";>
    <component name="C1">
            <implementation.composite name="ns:Composite2">
            <!-- wire ref1 to component C3's service1 -->
            <reference name="ref1" target="C3/service1"/>
            <!-- configure the service with ws binding -->
            <service name="svc1">
                <binding.ws .../>
            </service>
    </component>
</composite>

<composite name="Composite2" targetNamespace="http://dummy"; 
xmlns:ns="http://dummy";>
    <component name="C2">
            <implementation.java class="my.C2Impl">
    </component>

    <!-- innerService of component C2 is promoted as svc1 -->
    <service name="svc1" promote="C2/innerService"/>
    <!-- innerReference of component C2 is promoted as ref1 -->
    <reference name="ref1" promote="C2/innerReference"/>
</composite>

Thanks,
Raymond

----- Original Message ----- 
From: "Jason Clark" <[EMAIL PROTECTED]>
To: <tuscany-user@ws.apache.org>
Sent: Friday, October 12, 2007 2:21 PM
Subject: Promote?


> Hello all. I am trying to understand what the promote keyword in the
> composite file means? I've so far been able to find a definition of that,
> and the composite file in general.
>
>
>
> Thanks,
>
>
>
> Jason
>
>
>
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to