Rational Developer for System z, Version 7.6

Recursive composition with SCA tools

In SCA applications you can implement a component in a composite by using a second composite. This allows the recursive composition.
The example in this topic uses the SCA AccountServices sample as a starting point. For links to the sample, see "Related information" at the end of this topic.
The following steps show a simple example of recursive composition in SCA tools:
  1. In an existing SCA application, create a new composite. Right-click the namespace node and select New > SCA Composite. The composite might have the same namespace as the existing composite. You can change the namespace if you need to.
  2. Select the service in the original composite that is the general service provided by the composite.
  3. Right-click the name of the service that you selected, and click Promote. The result of promoting a component service is that it becomes a service available on the composite level. Note that you can achieve the same result manually by adding a service to the composite via the palette or action bar and then creating a wire between the composite service and the component service.
  4. Save the original composite.
  5. Open the new composite that your created in the first step of this task.
  6. With the palette or action bar, add a new component to the composite.
  7. Right-click the new component and select Set Implementation > Composite. The Composite Selection Dialog opens.
  8. In the Composite Selection Dialog, choose the original composite in the application.
  9. Add a service to the new component. Then, right-click the service and select Show Properties View. In the Properties view, select the Core tab. Note that the default name of the service is service.
  10. Save the project. If the project now shows an error and the Problems tab has the message The "service" service is not defined by the implementation, this is because the service name that you use on a component that is implemented by a composite needs to match the name of the service provided by the original composite.
  11. If you received the error mentioned in the previous step, in the properties for the new service change the name to match the service provided by the implementing composite, and save the project. The error is resolved.
You now have an SCA application created that uses recursive composition.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)