SCA/SCA Component/SCA First Steps With Composite Designer
The objective of this tutorial is to show how to develop a simple SCA application using the STP/SCA Composite Designer.
You can download a pdf version of this tutorial: "First Steps with the SCA Composite Designer".
The tutorial illustrates how to:
- Install the STP/SCA plugins and Apache Tuscany
- Define an SCA assembly with the SCA Composite Designer
- Refine properties in an SCA assembly
- Define an SCA assembly with different implementation technologies
- Define an RMI binding
- Run and test SCA assemblies with Tuscany
In order to be able to test the sample SCA application, you need to :
- install Apache Tuscany on your machine,
- set up Eclipse for Tuscany.
The SCA Restaurant Application
This composite, named restaurant, is a composition of five components:
- Allows you to see the Menus proposed by the restaurant.
- It allows also to compute the bill for a particular menu.
- Provides different menus. A Menu is defined by a description and the price without taxes.
- Computes the price of a menu with the different taxes.
- Computes the VAT (Value Added Tax).
- Computes the tip.
First SCA Application
Create a new Java Project
First, create a Java Project to hold the Restaurant application:
- Select File > New > Java Project.
- Set "Restaurant" as the Project name. For Project layout, select Create separate folders for sources and class files. Click on the Next button.
- Click on the Finish button.
Create a new SCA Composite diagram
To create an SCA diagram:
- Right-click the project and select New > Other....
- In the New wizard, select SCA Composite Diagram in the SCA Tools folder (Other folder if there is no SOA Tools folder) and click Next.
- Choose a folder and type a unique name for the diagram in the File name field and click Finish.
In accordance with the SCA specifications, the composite and the composite file have the same name. The name of the composite is automatically set
Now, you should see the following project structure: