The designers of SCA envision three project phases: Development, Assembly, and Deployment.
After you've written an implementation, you set SCA values that configure the runtime behavior. The configured implementation is called a component.
The details of a component are stored in an SCA definition like the one shown in Listing 9.1.
Listing 9.1: Sample SCA component definition
<component name="ProcessQuoteComponent" requires="confidentiality"> <implementation.bpel name="ProcessQuoteImplementation" /> <service name="ProcessQuote"> <interface.partnerLinkType type="ProcessQuotePLT" serviceRole="ProcessQuoteRole" /> <binding.sca/> </service> <property name="availableDiscount" many="true">Auto Club</property> <reference name="calculateOne" target="CalculateOneComponent" /> <reference name="calculateTwo" target="CalculateTwoComponent" /> </component>
A component provides access to operations. It also has properties (each of which assigns an initial value to an implementation variable) and depends on the resolution of references (each of which identifies a set of operations that are external to the implementation).
At assembly time, the actor is an SCA assembler. Although you, as the developer, often act as an assembler, the role may be fulfilled by a business analyst or by another developer.
The SCA assembler composes a logical unit called a composite, which solves a business problem and is made up primarily of one or more components. Some composites are deployed in a single operating-system process, while others are distributed across different processes or across different physical machines on a network.
The details of a composite are stored in an SCA definition that includes component definitions. Listing 9.2 shows an outline.
Listing 9.2: SCA composite outline
<composite name="myComposite" local="false"> <service> </service> <property> </property> <reference> </reference> <wire> </wire> <component> <implementation/> <service/> <property/> <reference/> </component> <component> <implementation/> <service/> <property/> <reference/> </component> </composite>
An SCA assembler assembles a composite from components; assembles deployable units from existing composites; creates higher-level assemblies from the deployable units; and creates even higher-level assemblies from the existing assemblies, to any level of hierarchy.
At deployment time, an SCA deployer
assembles higher-level assemblies from existing assemblies.
overrides configuration values that were established at lower levels of assembly.
completes the work of connecting one logical unit to another, to the extent that the SCA assembler has not already handled the issue. Specifically, the deployer decides which service endpoint to access in response to a method or function invocation and identifies which transport protocol to use when accessing the endpoint.
sets Quality of Service values that affect whether requesters can or will access your service - in particular, by setting requirements. One requirement, for example, might be for requesters to use a particular kind of encryption. The developer or assembler may have restricted the deployer's options in an earlier phase.