Versions Compared

Key

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

...

What demo app are we going to use this time round? I've just dropped some bits of XML to demonstrate the point but am not wedded to them.

Contents

Intoduction - Haleh

...

Tuscany SCA achieves these benefits with a fairly light touch. The SCA specifications defines an XML description of assembled services which separates the component implementation;

Code Block

@Service(AccountService.class)
public class AccountServiceImpl implements AccountService {

    @Reference
    protected AccountDataService accountDataService;

    public double getAccountTotal(String customerID) {

        CheckingAccount checking = accountDataService.getCheckingAccount(customerID);
        SavingsAccount savings = accountDataService.getSavingsAccount(customerID);
        
        // Calculate the total balance of all accounts and return it
        double balance = checking.getBalance() + savings.getBalance();

        return balance;
    }
}

from the technologies used to connect them together. ;

Code Block

A component
Code Block

SCDL
   Component
   Service/Binding
   Policy
    <component name="AccountServiceComponent">
        <implementation.java class="bigbank.account.AccountServiceImpl"/>
        <service name="AccountService">
            <tuscany:binding.jsonrpc uri="/AccountJSONService"/>
            <binding.ws />
        </service>	   	
    </component>

The precise relationship between the abstract components and runtime infrastructure is further refined using policy statements to apply organizationally agreed constrains on the behaviour of the application in its deployed environment, for example, from dictating which communications should be encrypted to describing the level of monitoring and logging that is required.

...