On Tue, Jul 26, 2011 at 10:32 PM, Raymond Feng <enjoyj...@gmail.com> wrote:

> Hi,
>
> It's the implementation class that dictates all the services it provide.
> The <service> element is used in the composite to further configure the
> service and the @name has to match what's introspected from the impl (in SCA
> term, the componentType). If no further configuration is needed, you don't
> have the list the service in the composite.
>

Thanks for your reply!

So, what you say on following reasoning?

eg:

*
<component name="
SubtractServiceComponent">
        <implementation.java class="calculator.SubtractServiceImpl"/>
 </component>

For this, I'll add a service to "SubtractServiceComponent", since there are
no 'service' elements.

*
<component name="Catalog">
        <implementation.java class="services.FruitsCatalogImpl"/>
        <property name="currencyCode">USD</property>
        <service name="Catalog">
            <t:binding.jsonrpc/>
           </service>
        <reference name="currencyConverter" target="CurrencyConverter"/>
    </component>

For this "Catalog" component "Catalog" is the only service, that I'll be
added.

Thanks.


>
> Thanks,
> Raymond
> *________________________________________________________________
> Raymond Feng
> rf...@apache.org
> Apache Tuscany PMC member and committer: tuscany.apache.org
> Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
> Personal Web Site: www.enjoyjava.com
> ________________________________________________________________*
>
> On Jul 26, 2011, at 2:26 AM, Nirmal Fernando wrote:
>
> Hi All,
>
> If a <service> element present for a component, could I neglect 'class'
> attribute value of <implementation.java> element, for the composite diagram
> purposes?
>
>
> ____________________________________________________________________________________
> eg:
>
> *
> <component name="SubtractServiceComponent">
>         <implementation.java class="calculator.SubtractServiceImpl"/>
>  </component>
>
> For this, I'll add a service to "SubtractServiceComponent", since there are
> no 'service' elements.
>
> *
> <component name="Catalog">
>         <implementation.java class="services.FruitsCatalogImpl"/>
>         <property name="currencyCode">USD</property>
>         <service name="Catalog">
>             <t:binding.jsonrpc/>
>            </service>
>         <reference name="currencyConverter" target="CurrencyConverter"/>
>
>     </component>
>
> For this "Catalog" component "Catalog" is the only service, that I'll be
> added.
>
> _________________________________________________________________________
>
> Highly appreciate your thoughts!
>
> Thanks.
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Department of Computer Science & Engineering,
> Faculty of Engineering,
> University of Moratuwa,
> Sri Lanka.
>
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to