<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
    configId="org/activemq/itest/ServerEar"
    parentId="org/apache/geronimo/Server">

    <module>
        <ejb>activemq-itest-ejb-${pom.currentVersion}.jar</ejb>
        <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar" configId="mdb_msg_ejb.jar">
            <enterprise-beans>
                  <session>
                      <ejb-name>JMSToolBean</ejb-name>
                      <jndi-name>org/activemq/itest/JMSToolBean</jndi-name>
                  </session>
                  <message-driven>
                      <ejb-name>MDBTransferBean</ejb-name>
                      <resource-adapter>
                          <resource-link>ITest ActiveMQ RA</resource-link>
                      </resource-adapter>
                  </message-driven>
            </enterprise-beans>
        </openejb-jar>
    </module>

    <module>
        <connector>activemq-ra-${pom.currentVersion}.rar</connector>
        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector" version="1.5" configId="null">
            <resourceadapter>
                <resourceadapter-instance>
                    <resourceadapter-name>ITest ActiveMQ RA</resourceadapter-name>
                    <config-property-setting name="ServerUrl">tcp://localhost:61616</config-property-setting>
                    <workmanager>
                        <gbean-link>DefaultWorkManager</gbean-link>
                    </workmanager>
                </resourceadapter-instance>
                <outbound-resourceadapter>
                    <connection-definition>
                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
                        <connectiondefinition-instance>
	                        <name>jms/Default</name>
                            <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
                            <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
                            <connectionmanager>
                                <xa-transaction>
                                    <transaction-caching/>
                                </xa-transaction>
                                <single-pool>
                                    <max-size>10</max-size>
                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                                    <match-one/>
                                </single-pool>
                            </connectionmanager>
                            <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
                        </connectiondefinition-instance>
                    </connection-definition>
                </outbound-resourceadapter>
            </resourceadapter>

            <adminobject>
                <adminobject-interface>javax.jms.Queue</adminobject-interface>
                <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
                <adminobject-instance>
                    <message-destination-name>MDBOutQueue</message-destination-name>
                    <config-property-setting name="PhysicalName">MDBOutQueue</config-property-setting>
                </adminobject-instance>
            </adminobject>
            <adminobject>
                <adminobject-interface>javax.jms.Queue</adminobject-interface>
                <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
                <adminobject-instance>
                    <message-destination-name>MDBInQueue</message-destination-name>
                    <config-property-setting name="PhysicalName">MDBInQueue</config-property-setting>
                </adminobject-instance>
            </adminobject>

            <adminobject>
                <adminobject-interface>javax.jms.Queue</adminobject-interface>
                <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
                <adminobject-instance>
                    <message-destination-name>TestQueue</message-destination-name>
                    <config-property-setting name="PhysicalName">TestQueue</config-property-setting>
                </adminobject-instance>
            </adminobject>

            <adminobject>       
                <adminobject-interface>javax.jms.Topic</adminobject-interface>
                <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
                <adminobject-instance>
                    <message-destination-name>TestTopic</message-destination-name>
                    <config-property-setting name="PhysicalName">TestTopic</config-property-setting>
                </adminobject-instance>
            </adminobject>      

        </connector>
    </module>

</application>

