<?xml version="1.0" encoding="UTF-8"?><switchyard xmlns="urn:switchyard-config:switchyard:1.0">
    <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="policy-transaction" targetNamespace="urn:switchyard-quickstart-demo:policy-transaction:0.1.0">
        <service name="WorkService" promote="WorkService">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
                <inboundConnection>
                    <resourceAdapter name="hornetq-ra.rar"/>
                    <activationSpec>
                        <property name="destinationType" value="javax.jms.Queue"/>
                        <property name="destination" value="policyQSTransacted"/>
                    </activationSpec>
                </inboundConnection>
                <inboundInteraction>
                    <listener>javax.jms.MessageListener</listener>
                    <endpoint type="org.switchyard.component.jca.endpoint.JMSEndpoint"/>
                    <transacted>true</transacted>
                </inboundInteraction>
            </binding.jca>
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
                <inboundConnection>
                    <resourceAdapter name="hornetq-ra.rar"/>
                    <activationSpec>
                        <property name="destinationType" value="javax.jms.Queue"/>
                        <property name="destination" value="policyQSNonTransacted"/>
                    </activationSpec>
                </inboundConnection>
                <inboundInteraction>
                    <listener>javax.jms.MessageListener</listener>
                    <endpoint type="org.switchyard.component.jca.endpoint.JMSEndpoint"/>
                    <transacted>false</transacted>
                </inboundInteraction>
            </binding.jca>
        </service>
        <reference multiplicity="0..1" name="StoreAService" promote="TaskAService/StoreAService">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
                <outboundConnection>
                    <resourceAdapter name="hornetq-ra.rar"/>
                    <connection jndiName="java:/JmsXA"/>
                </outboundConnection>
                <outboundInteraction>
                    <processor type="org.switchyard.component.jca.processor.JMSProcessor">
                        <property name="destination" value="queueA"/>
                    </processor>
                </outboundInteraction>
            </binding.jca>
        </reference>
        <reference multiplicity="0..1" name="StoreBService" promote="TaskBService/StoreBService">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
                <outboundConnection>
                    <resourceAdapter name="hornetq-ra.rar"/>
                    <connection jndiName="java:/JmsXA"/>
                </outboundConnection>
                <outboundInteraction>
                    <processor type="org.switchyard.component.jca.processor.JMSProcessor">
                        <property name="destination" value="queueB"/>
                    </processor>
                </outboundInteraction>
            </binding.jca>
        </reference>
        <reference multiplicity="0..1" name="StoreCService" promote="TaskCService/StoreCService">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
                <outboundConnection>
                    <resourceAdapter name="hornetq-ra.rar"/>
                    <connection jndiName="java:/JmsXA"/>
                </outboundConnection>
                <outboundInteraction>
                    <processor type="org.switchyard.component.jca.processor.JMSProcessor">
                        <property name="destination" value="queueC"/>
                    </processor>
                </outboundInteraction>
            </binding.jca>
        </reference>
        <component name="TaskBService">
            <implementation.bean xmlns="urn:switchyard-component-bean:config:1.0" class="org.switchyard.quickstarts.demo.policy.transaction.TaskBServiceBean" requires="managedTransaction.Local"/>
            <service name="TaskBService" requires="suspendsTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.TaskBService"/>
            </service>
            <reference name="StoreBService" requires="suspendsTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.StoreService"/>
            </reference>
        </component>
        <component name="TaskAService">
            <implementation.bean xmlns="urn:switchyard-component-bean:config:1.0" class="org.switchyard.quickstarts.demo.policy.transaction.TaskAServiceBean" requires="managedTransaction.Global"/>
            <service name="TaskAService" requires="propagatesTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.TaskAService"/>
            </service>
            <reference name="StoreAService" requires="propagatesTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.StoreService"/>
            </reference>
        </component>
        <component name="TaskCService">
            <implementation.bean xmlns="urn:switchyard-component-bean:config:1.0" class="org.switchyard.quickstarts.demo.policy.transaction.TaskCServiceBean" requires="noManagedTransaction"/>
            <service name="TaskCService" requires="suspendsTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.TaskCService"/>
            </service>
            <reference name="StoreCService">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.StoreService"/>
            </reference>
        </component>
        <component name="WorkService">
            <implementation.bean xmlns="urn:switchyard-component-bean:config:1.0" class="org.switchyard.quickstarts.demo.policy.transaction.WorkServiceBean"/>
            <service name="WorkService" requires="propagatesTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.WorkService"/>
            </service>
            <reference name="TaskCService" requires="suspendsTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.TaskCService"/>
            </reference>
            <reference name="TaskAService" requires="propagatesTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.TaskAService"/>
            </reference>
            <reference name="TaskBService" requires="suspendsTransaction">
                <interface.java interface="org.switchyard.quickstarts.demo.policy.transaction.TaskBService"/>
            </reference>
        </component>
    </composite>
    <!-- Uncomment this section to trace message exchange activity
    <domain>
       <properties>
          <property name="org.switchyard.handlers.messageTrace.enabled" value="true"/>
       </properties>
    </domain>
    -->
</switchyard>
