<?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:spring="http://www.springframework.org/schema/beans"
       xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.0"
       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">

    <spring:bean name="txFactory" class="org.mule.tck.testmodels.mule.TestTransactionFactory">
        <spring:property name="value" value="foo"/>
    </spring:bean>

    <spring:bean name="connectionFactory" class="org.mule.transport.jms.test.TestConnectionFactory"/>
    
    <spring:bean name="redeliveryHandlerFactory" class="org.mule.transport.jms.test.TestRedeliveryHandlerFactory"/>
    
    <!-- Default config -->
    <jms:connector name="jmsConnectorDefaults" connectionFactory-ref="connectionFactory"/>

    <jms:connector name="jmsConnector1"
                   acknowledgementMode="DUPS_OK_ACKNOWLEDGE"
                   clientId="myClient"
                   durable="true"
                   noLocal="true"
                   persistentDelivery="true"
                   maxRedelivery="5"
                   cacheJmsSessions="true"
                   recoverJmsConnections="false"
                   eagerConsumer="false"
                   specification="1.1"
                   numberOfConcurrentTransactedReceivers="7"
                   connectionFactory-ref="connectionFactory"
                   redeliveryHandlerFactory-ref="redeliveryHandlerFactory"
                   username="myuser"
                   password="mypass"/>

    <jms:custom-connector name="jmsConnector2" class="org.mule.transport.jms.JmsConnector"
                          specification="1.1">
         <spring:property name="connectionFactory" ref="connectionFactory"/>
    </jms:custom-connector>

    <jms:connector name="jmsConnector3"
                    acknowledgementMode="DUPS_OK_ACKNOWLEDGE"
                    clientId="myClient"
                    durable="true"
                    noLocal="true"
                    persistentDelivery="true"
                    maxRedelivery="5"
                    cacheJmsSessions="true"
                    recoverJmsConnections="false"
                    eagerConsumer="false"
                    specification="1.1"
                    connectionFactory-ref="connectionFactory"
                    redeliveryHandlerFactory-ref="redeliveryHandlerFactory"/>

    <jms:endpoint name="endpoint1" queue="blah" connector-ref="jmsConnectorDefaults">
        <jms:selector expression="foo"/>
    </jms:endpoint>

    <jms:endpoint name="endpoint2" address="jms://blah" connector-ref="jmsConnectorDefaults">
        <not-filter>
            <jms:property-filter pattern="bar"/>
        </not-filter>
    </jms:endpoint>

    <jms:endpoint name="endpoint3" queue="blah" connector-ref="jmsConnectorDefaults">
        <custom-transaction factory-ref="txFactory"/>
    </jms:endpoint>

</mule>
