Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
    targetNamespace="http://bigbank" name="BigBank">

    <component name="CustomerAsset">
        <implementation.java class="bigbank.CustomerAssetImpl" />
        <reference name="accountData" target="AccountData" />
        <reference name="stockValue" target="StockValue" />

        <reference name="exchangeRate">
            <tuscany:binding.rss
                uri="http://ansuz.sooke.bc.ca/rippy/exchange/?M=R&amp;B=USD&amp;F=CAD,CNY,EUR&amp;T=F&amp;S=O&amp;I=S" />
        </reference>
    </component>

    <component name="AccountData">
        <implementation.java class="bigbank.AccountDataImpl" />
    </component>

    <component name="StockValue">
        <tuscany:implementation.xquery location="stock.xq" />
        <!-- 
        <property name="currency">USD</property>
         -->
    </component>

    <reference name="StockQuoteReference" promote="CustomerAsset/stockQuote">
        <binding.ws wsdlElement="http://swanandmokashi.com#wsdl.port(StockQuotes/StockQuotesSoap)" />
    </reference>

</composite>

...

Distributed Services

The service oriented approach to building applications promotes the benefits of deploying running solutions as a collection of loosely coupled services. Tuscany Java SCA provides a runtime that will host these loosely couple services in a single JVM or across multiple JVMs.

Tuscany Java SCA uses the term Node to describe a single Tuscany SCA runtime and the term Domain to describe a collection of nodes that together run related but distributed services in an SCA application

Image Added

You will have see previously in this paper the use of specific binding configuration access remote services, for example,

Code Block

binding.ws with uri set

Tuscany SCA brings an easier to use mechanism for providing communication with remote services within a domain. As Tuscany SCA knows where all services are in the domain you can simply refer to the target service by names and Tuscany SCA will use a default SCA binding to communicate with it regardless of whether the service is local or remote to the calling component.

Code Block

target based reference

The benefit of this approach is that the infrastruture can be adjusted and the components redeployed without having to change any .composite file information.

Getting Started With Your Own Project

...