Versions Compared

Key

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

...

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
    <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.

...

Let's think in SOA. Leave the IT things such as hardware, software and networks on side and think from the business perspectives. First, we need to identify the business functions and model them as service components. And then define the relationship between business functions. For example, Order Processing needs to deal with Inventory and Shipment. These dependencies are captured as references and services.

Business Functions

Services Provided

Services Consumed

Order Processing

Process Orders

Check Inventory, Collect Payment, Arrange Shipments

Inventory

Check Inventory

Warehouse

Payment

Collect payment

Credit Card Authorization, PayPal

Shipment

Ship the order

Shippers such as UPS, USPS or Fedex

...

Code Block
A simple Java component 

TODO - bring in binding.ejb

Code Block
    <component name="AccountDataServiceComponent">
        <implementation.java class="bigbank.accountdata.AccountDataServiceImpl" />
        <reference name="brokerService">
            <binding.ejb uri="corbaname:iiop:1.2@localhost:1050#BrokerServiceBean" />
        </reference>
    </component>

...

Code Block
SCDL showing implementation.script 
Code Block
Simple javascript component

...