<?xml version="1.0" encoding="UTF-8"?>
<switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:sy="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:jpa="urn:switchyard-component-camel-jpa:config:1.0" xmlns:rules="urn:switchyard-component-rules:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="switchyard-quickstart-demo-transaction-propagation-dealer" targetNamespace="urn:switchyard-quickstart-demo-transaction-propagation-dealer:1.0">
  <sca:composite name="switchyard-quickstart-demo-transaction-propagation-dealer" targetNamespace="urn:switchyard-quickstart-demo-transaction-propagation-dealer:1.0">
    <sca:service name="Dealer" promote="DealerBean/Dealer">
      <sca:interface.java interface="org.switchyard.quickstarts.demo.txpropagation.Dealer"/>
      <sca:binding.sca/>
    </sca:service>
    <sca:component name="DealerBean">
      <bean:implementation.bean requires="managedTransaction.Global" class="org.switchyard.quickstarts.demo.txpropagation.DealerBean"/>
      <sca:service name="Dealer">
        <sca:interface.java interface="org.switchyard.quickstarts.demo.txpropagation.Dealer"/>
      </sca:service>
      <sca:reference name="CreditCheckService" requires="propagatesTransaction">
        <sca:interface.java interface="org.switchyard.quickstarts.demo.txpropagation.CreditCheckService"/>
      </sca:reference>
      <sca:reference name="DealLogger" requires="propagatesTransaction">
        <sca:interface.java interface="org.switchyard.quickstarts.demo.txpropagation.DealLogger"/>
      </sca:reference>
    </sca:component>
    <sca:reference name="CreditCheckService" multiplicity="0..1" promote="DealerBean/CreditCheckService">
      <sca:interface.java interface="org.switchyard.quickstarts.demo.txpropagation.CreditCheckService"/>
      <sca:binding.sca sy:clustered="true" sy:targetNamespace="urn:switchyard-quickstart-demo-transaction-propagation-credit:1.0"/>
    </sca:reference>
    <sca:reference name="DealLogger" multiplicity="0..1" promote="DealerBean/DealLogger">
      <sca:interface.java interface="org.switchyard.quickstarts.demo.txpropagation.DealLogger"/>
      <jpa:binding.jpa>
        <jpa:entityClassName>org.switchyard.quickstarts.demo.txpropagation.Deal</jpa:entityClassName>
        <jpa:persistenceUnit>DealerUnit</jpa:persistenceUnit>
        <jpa:transactionManager>#jtaTransactionManager</jpa:transactionManager>
        <jpa:produce>
        </jpa:produce>
      </jpa:binding.jpa>
    </sca:reference>
  </sca:composite>
</switchyard>
