You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Composite1

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
    targetNamespace="http://sample"
    xmlns:sample="http://sample"
    name="Composite1">

    <component name="ComponentA">
        <implementation.java class="sample.ComponentAImpl"/>
    </component>

    <component name="ComponentB">
        <!-- Implemented by Composite3 -->
        <implementation.composite name="sample:Composite3"/>
        
        <!-- Wired to ComponentA -->
        <reference name="Reference1" target="ComponentA"/>

        <property name="Property1">ABC</property>
    </component>
    
    <!-- ComponentB.Service1 is promoted -->
    <service name="Service1" promote="ComponentB/Service1" />

</composite>
Composite2
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://sample" xmlns:sample="http://sample"
    name="Composite2">

    <component name="ComponentC">
        <implementation.java class="sample.ComponentAImpl" />

        <!-- Wired to ComponentD.Service1 -->
        <reference name="Reference1" target="ComponentD/Service1" />
    </component>

    <component name="ComponentD">
        <!-- Implemented by Composite3 -->
        <implementation.composite name="sample:Composite3" />
        
        <!-- The property value is "XYZ" -->
        <property name="Property1">XYZ</property>
    </component>

    <!-- ComponentD.Reference1 is promoted -->
    <reference name="Reference1" promote="ComponentD/Reference1" />

</composite>

Composite3
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://sample" xmlns:sample="http://sample"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Composite3">

    <component name="ComponentE">
        <implementation.java class="sample.ComponentEImpl" />
        <reference name="Reference1" target="ComponentF/Service1" />
        
        <!-- The property is from the composite Property1 -->
        <property name="Property1" source="$Property1" />
    </component>

    <component name="ComponentF">
        <implementation.java class="sample.ComponentFImpl" />
    </component>

    <service name="Service1" promote="ComponentE/Service1" />

    <reference name="Reference1" promote="ComponentF/Reference1">
        <binding.sca />
    </reference>

    <property name="Property1" type="xsd:string">123</property>

</composite>
  • No labels