You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Fengxiang <me...@gmail.com> on 2008/03/23 10:06:58 UTC

Ask for help on promot and target

Dear all,
My mother luangage is not english.So I can't got an deep understand with the
specification document of assembly of sca.
Especially on attribution of promot and target, Could you give me an detail
explaination .
Thanks.

Re: Ask for help on promot and target

Posted by Raymond Feng <en...@gmail.com>.
You are very welcome to translate it into Chinese and post it to our wiki 
site [1] and/or your blog (please share it with Tuscany community). I'm 
Chinese too and I'll be glad to review your contribution.

Thanks,
Raymond

[1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Chinese+Web+Site

--------------------------------------------------
From: "Fengxiang" <me...@gmail.com>
Sent: Tuesday, March 25, 2008 11:32 PM
To: <tu...@ws.apache.org>
Subject: Re: Ask for help on promot and target

> Thanks for you help!
> Should I translate your msg into Chinese and post it to a blog if you 
> permit
> and your are not Chinese?
>
> 2008/3/26, Raymond Feng <en...@gmail.com>:
>>
>> Hi,
>>
>> Let me give a try:
>>
>> 1) @target
>>
>> a) An SCA service represents a business function that a component
>> provides,
>> for example, a book store selling books.
>> b) An SCA reference represents a business function that a component
>> consumes, for example, book store needs to use shopping cart and catalog.
>>
>> The 'target' attribute of <reference> points to an SCA service that can
>> provide the business function required by the reference. For example, if
>> the
>> BookStore component has a catalog reference as follows:
>>
>> <component name="BookStoreComponent">
>>     <reference name="catalog" target="CatalogComponent/Catalog"/>
>> </component>
>>
>> <component name="CatalogComponent">
>>     ...
>> </component>
>>
>> The @target says CatalogComponent's Catalog service is the provider for
>> catalog reference. If you change it to "NewCatalogComponent/Catalog", you
>> basically switch to a new service provider: NewCatalogComponent's Catalog
>> service.
>>
>> 2) @promote
>>
>> In SCA, a pre-assembled composite can be reused as a building block for
>> compositions. It's achieved by <implementation.composite>. For example,
>> the
>> Catalog service itself can be developed as a SCA composite. Inside the
>> Catalog composite, there could be a few java components.
>>
>> <component name="CatalogComponent>
>>     <implementation.composite composite="ns1:CatalogComposite"/>
>>     ...
>> </component>
>>
>> Now the question is what services/references in the CatalogComposite will
>> be
>> made public for CatalogComponent. Service/Reference promotion is
>> introduced
>> for this purpose.
>>
>> For example,
>>
>> <composite name="CatalogComposite">
>>     <service name="Catalog"
>> promote="InternalCatalogComponent/InternalCatalog">
>>          ...
>>     </service>
>>
>>     <reference name="parnterCatalog"
>> promote="InternalCatalogComponent/partnerCatalog">
>>          ...
>>     </reference>
>>
>>
>>     <component name="InternalCatalogComponent>
>>     ...
>>     </component>
>> </composite>
>>
>> The @promote for the <service> says if CatalogComposite is used as a
>> component for assembly, there is a service named Catalog that makes the
>> InternalCatalogComponent's InternalCatalog service public. As a result,
>> the
>> CatalogComponent has a public Catalog service that can be wired to.
>>
>> The @promote for the <reference> says if CatalogComposite is used as a
>> component for assembly, there is a reference named partnerCatalog that
>> makes
>> the InternalCatalogComponent's partnerCatalog reference public. As a
>> result,
>> the CatalogComponent has a public partnerCatalog reference and a service
>> provider can be defined for this reference.
>>
>> Thanks,
>> Raymond
>> --------------------------------------------------
>> From: "Fengxiang" <me...@gmail.com>
>> Sent: Sunday, March 23, 2008 2:06 AM
>> To: <tu...@ws.apache.org>
>> Subject: Ask for help on promot and target
>>
>>
>> > Dear all,
>> > My mother luangage is not english.So I can't got an deep understand 
>> > with
>> > the
>> > specification document of assembly of sca.
>> > Especially on attribution of promot and target, Could you give me an
>> > detail
>> > explaination .
>> > Thanks.
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Ask for help on promot and target

Posted by Fengxiang <me...@gmail.com>.
Thanks for you help!
Should I translate your msg into Chinese and post it to a blog if you permit
and your are not Chinese?

2008/3/26, Raymond Feng <en...@gmail.com>:
>
> Hi,
>
> Let me give a try:
>
> 1) @target
>
> a) An SCA service represents a business function that a component
> provides,
> for example, a book store selling books.
> b) An SCA reference represents a business function that a component
> consumes, for example, book store needs to use shopping cart and catalog.
>
> The 'target' attribute of <reference> points to an SCA service that can
> provide the business function required by the reference. For example, if
> the
> BookStore component has a catalog reference as follows:
>
> <component name="BookStoreComponent">
>     <reference name="catalog" target="CatalogComponent/Catalog"/>
> </component>
>
> <component name="CatalogComponent">
>     ...
> </component>
>
> The @target says CatalogComponent's Catalog service is the provider for
> catalog reference. If you change it to "NewCatalogComponent/Catalog", you
> basically switch to a new service provider: NewCatalogComponent's Catalog
> service.
>
> 2) @promote
>
> In SCA, a pre-assembled composite can be reused as a building block for
> compositions. It's achieved by <implementation.composite>. For example,
> the
> Catalog service itself can be developed as a SCA composite. Inside the
> Catalog composite, there could be a few java components.
>
> <component name="CatalogComponent>
>     <implementation.composite composite="ns1:CatalogComposite"/>
>     ...
> </component>
>
> Now the question is what services/references in the CatalogComposite will
> be
> made public for CatalogComponent. Service/Reference promotion is
> introduced
> for this purpose.
>
> For example,
>
> <composite name="CatalogComposite">
>     <service name="Catalog"
> promote="InternalCatalogComponent/InternalCatalog">
>          ...
>     </service>
>
>     <reference name="parnterCatalog"
> promote="InternalCatalogComponent/partnerCatalog">
>          ...
>     </reference>
>
>
>     <component name="InternalCatalogComponent>
>     ...
>     </component>
> </composite>
>
> The @promote for the <service> says if CatalogComposite is used as a
> component for assembly, there is a service named Catalog that makes the
> InternalCatalogComponent's InternalCatalog service public. As a result,
> the
> CatalogComponent has a public Catalog service that can be wired to.
>
> The @promote for the <reference> says if CatalogComposite is used as a
> component for assembly, there is a reference named partnerCatalog that
> makes
> the InternalCatalogComponent's partnerCatalog reference public. As a
> result,
> the CatalogComponent has a public partnerCatalog reference and a service
> provider can be defined for this reference.
>
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Fengxiang" <me...@gmail.com>
> Sent: Sunday, March 23, 2008 2:06 AM
> To: <tu...@ws.apache.org>
> Subject: Ask for help on promot and target
>
>
> > Dear all,
> > My mother luangage is not english.So I can't got an deep understand with
> > the
> > specification document of assembly of sca.
> > Especially on attribution of promot and target, Could you give me an
> > detail
> > explaination .
> > Thanks.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

Re: Ask for help on promot and target

Posted by Raymond Feng <en...@gmail.com>.
Hi,

Let me give a try:

1) @target

a) An SCA service represents a business function that a component provides, 
for example, a book store selling books.
b) An SCA reference represents a business function that a component 
consumes, for example, book store needs to use shopping cart and catalog.

The 'target' attribute of <reference> points to an SCA service that can 
provide the business function required by the reference. For example, if the 
BookStore component has a catalog reference as follows:

<component name="BookStoreComponent">
    <reference name="catalog" target="CatalogComponent/Catalog"/>
</component>

<component name="CatalogComponent">
    ...
</component>

The @target says CatalogComponent's Catalog service is the provider for 
catalog reference. If you change it to "NewCatalogComponent/Catalog", you 
basically switch to a new service provider: NewCatalogComponent's Catalog 
service.

2) @promote

In SCA, a pre-assembled composite can be reused as a building block for 
compositions. It's achieved by <implementation.composite>. For example, the 
Catalog service itself can be developed as a SCA composite. Inside the 
Catalog composite, there could be a few java components.

<component name="CatalogComponent>
    <implementation.composite composite="ns1:CatalogComposite"/>
    ...
</component>

Now the question is what services/references in the CatalogComposite will be 
made public for CatalogComponent. Service/Reference promotion is introduced 
for this purpose.

For example,

<composite name="CatalogComposite">
    <service name="Catalog" 
promote="InternalCatalogComponent/InternalCatalog">
         ...
    </service>

    <reference name="parnterCatalog" 
promote="InternalCatalogComponent/partnerCatalog">
         ...
    </reference>


    <component name="InternalCatalogComponent>
    ...
    </component>
</composite>

The @promote for the <service> says if CatalogComposite is used as a 
component for assembly, there is a service named Catalog that makes the 
InternalCatalogComponent's InternalCatalog service public. As a result, the 
CatalogComponent has a public Catalog service that can be wired to.

The @promote for the <reference> says if CatalogComposite is used as a 
component for assembly, there is a reference named partnerCatalog that makes 
the InternalCatalogComponent's partnerCatalog reference public. As a result, 
the CatalogComponent has a public partnerCatalog reference and a service 
provider can be defined for this reference.

Thanks,
Raymond
--------------------------------------------------
From: "Fengxiang" <me...@gmail.com>
Sent: Sunday, March 23, 2008 2:06 AM
To: <tu...@ws.apache.org>
Subject: Ask for help on promot and target

> Dear all,
> My mother luangage is not english.So I can't got an deep understand with 
> the
> specification document of assembly of sca.
> Especially on attribution of promot and target, Could you give me an 
> detail
> explaination .
> Thanks.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Ask for help on promot and target

Posted by Fengxiang <me...@gmail.com>.
Thanks.

2008/3/24, Dan Becker <da...@gmail.com>:
>
> Fengxiang wrote:
> > My mother luangage is not english.So I can't got an deep understand with
> the
> > specification document of assembly of sca.
> > Especially on attribution of promot and target, Could you give me an
> detail
> > explaination .
>
>
> Hello Fengxiang,
>
> Your English is fine. We all understand your message.
>
> I do not know if you are aware of the Tuscany introduction pages at
> http://incubator.apache.org/tuscany/sca-java.html. The documentation
> section has some good overview of the specification.
>
> Some of the calculator examples at
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/
> show how to program targets. Write back if this does not help with what
> you are looking for.
>
>
> --
> Thanks, Dan Becker
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

Re: Ask for help on promot and target

Posted by Dan Becker <da...@gmail.com>.
Fengxiang wrote:
> My mother luangage is not english.So I can't got an deep understand with the
> specification document of assembly of sca.
> Especially on attribution of promot and target, Could you give me an detail
> explaination .

Hello Fengxiang,

Your English is fine. We all understand your message.

I do not know if you are aware of the Tuscany introduction pages at 
http://incubator.apache.org/tuscany/sca-java.html. The documentation 
section has some good overview of the specification.

Some of the calculator examples at 
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/ 
show how to program targets. Write back if this does not help with what 
you are looking for.

-- 
Thanks, Dan Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org