<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>

    <!-- JOTM Transaction manager -->
    <bean name="ArjunaFactory" class="org.mule.module.jboss.transactions.JBossArjunaTransactionManagerFactory"/>

    <bean id="arjunaTM"
        factory-bean="ArjunaFactory" factory-method="create"/>


    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
	    <property name="location">
            <value>classpath:derby.properties</value>
        </property>
    </bean>
    <!-- Data Source -->
    <bean id="jdbcDataSource"
        class="org.enhydra.jdbc.standard.StandardXADataSource"
        destroy-method="shutdown">
        <property name="transactionManager">
            <ref local="arjunaTM"/>
        </property>
        <property name="driverName">
            <value>org.apache.derby.jdbc.EmbeddedDriver</value>
        </property>
        <property name="url">
            <value>${database.connection}</value>
        </property>
    </bean>
    <!--
    <bean id="jdbcDataSourceXa"
        class="org.enhydra.jdbc.pool.StandardXAPoolDataSource"
        destroy-method="shutdown">
        <property name="dataSource">
            <ref local="innerDataSource"/>
        </property>
        <property name="maxSize">
            <value>10</value>
        </property>
    </bean>
    -->

    <!-- ActiveMQ -->
    <bean id="jmsConnectionFactoryXa"
        class="org.apache.activemq.ActiveMQXAConnectionFactory">
        <property name="brokerURL"><value>vm://localhost?broker.persistent=false&amp;broker.useJmx=false</value></property>
    </bean>

</beans>
