<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:mule="http://www.mulesource.org/schema/mule/core/2.0"
      xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.0"
      xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.0"
      xmlns:jbossts="http://www.mulesource.org/schema/mule/jbossts/2.0"
      xmlns:spring="http://www.springframework.org/schema/beans"
      xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
       http://www.mulesource.org/schema/mule/jms/2.0 http://www.mulesource.org/schema/mule/jms/2.0/mule-jms.xsd
       http://www.mulesource.org/schema/mule/vm/2.0 http://www.mulesource.org/schema/mule/vm/2.0/mule-vm.xsd
       http://www.mulesource.org/schema/mule/jbossts/2.0 http://www.mulesource.org/schema/mule/jbossts/2.0/mule-jbossts.xsd">

    <jbossts:transaction-manager/>

    <jms:activemq-xa-connector name="jmsConnector" specification="1.1" numberOfConcurrentTransactedReceivers="1"
                               maxRedelivery="1">
        <receiver-threading-profile maxThreadsActive="1" maxThreadsIdle="1" maxBufferSize="1" doThreading="false"
                                    poolExhaustedAction="WAIT"/>
        <dispatcher-threading-profile maxThreadsActive="1" maxThreadsIdle="1" maxBufferSize="1" doThreading="false"
                                      poolExhaustedAction="WAIT"/>
    </jms:activemq-xa-connector>
    <model name="TEST">
        <service name="Part1">
            <inbound>
                <jms:inbound-endpoint queue="in">
                    <jms:xa-transaction action="BEGIN_OR_JOIN"/>
                    <properties>
                        <spring:entry key="reuseConsumer" value="true"/>
                        <spring:entry key="reuseSession" value="true"/>
                    </properties>
                </jms:inbound-endpoint>
            </inbound>
            <component>
                <singleton-object
                        class="org.mule.transport.jms.integration.JmsXAAlwaysBeginTestCase$TestRollbackComponent"/>
            </component>
            <outbound>
                <outbound-pass-through-router>
                    <jms:outbound-endpoint queue="out">
                        <jms:xa-transaction action="BEGIN_OR_JOIN"/>
                    </jms:outbound-endpoint>
                    <jms:xa-transaction action="ALWAYS_BEGIN"/>
                </outbound-pass-through-router>
            </outbound>
        </service>
    </model>
</mule>