<?xml version="1.0" encoding="US-ASCII"?>

<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
   version="2.1">
                            
   <description>
        A collection of simple EJBs for testing ActiveMQ integration with JBoss.
   </description>

   <enterprise-beans>

      <session>
         <description>A stateless session bean that sends a small text message to jms</description>
         <display-name>Sender EJB</display-name>
         <ejb-name>SenderEJB</ejb-name>
         <home>com.panacya.platform.service.bus.sender.SenderHome</home>
         <remote>com.panacya.platform.service.bus.sender.Sender</remote>
         <ejb-class>com.panacya.platform.service.bus.sender.SenderBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
         <resource-ref>
            <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
            <res-type>javax.jms.QueueConnectionFactory</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Unshareable</res-sharing-scope>
         </resource-ref>
         <message-destination-ref>
            <message-destination-ref-name>jms/LogQueue</message-destination-ref-name>
            <message-destination-type>javax.jms.Queue</message-destination-type>
            <message-destination-usage>Produces</message-destination-usage>
            <message-destination-link>LoggingQueue</message-destination-link>
         </message-destination-ref>
      </session>

      <message-driven>
         <description>An MDB listening on a queue.</description>
         <ejb-name>QueueListenerMDB</ejb-name>
         <ejb-class>com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean</ejb-class>
         <messaging-type>javax.jms.MessageListener</messaging-type>
         <transaction-type>Container</transaction-type>
         <activation-config>
            <activation-config-property>
               <activation-config-property-name>destination</activation-config-property-name>
               <activation-config-property-value>queue.testQueue</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>destinationType</activation-config-property-name>
               <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>acknowledgeMode</activation-config-property-name>
               <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>messageSelector</activation-config-property-name>
               <activation-config-property-value/>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>maxSessions</activation-config-property-name>
               <activation-config-property-value>1</activation-config-property-value>
            </activation-config-property>
         </activation-config>
         <ejb-ref>
            <ejb-ref-name>ejb/Sender</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>com.panacya.platform.service.bus.sender.SenderHome</home>
            <remote>com.panacya.platform.service.bus.sender.Sender</remote>
            <ejb-link>SenderEJB</ejb-link>
         </ejb-ref>
      </message-driven>

      <message-driven>
         <description>An MDB listening on a topic with a non-durable subscription.</description>
         <ejb-name>TopicNonDurableMDB</ejb-name>
         <ejb-class>com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean</ejb-class>
         <messaging-type>javax.jms.MessageListener</messaging-type>
         <transaction-type>Container</transaction-type>
         <activation-config>
            <activation-config-property>
               <activation-config-property-name>destination</activation-config-property-name>
               <activation-config-property-value>topic.testTopic</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>destinationType</activation-config-property-name>
               <activation-config-property-value>javax.jms.Topic</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>acknowledgeMode</activation-config-property-name>
               <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>subscriptionDurability</activation-config-property-name>
               <activation-config-property-value>NonDurable</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>messageSelector</activation-config-property-name>
               <activation-config-property-value/>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>maxSessions</activation-config-property-name>
               <activation-config-property-value>1</activation-config-property-value>
            </activation-config-property>
         </activation-config>
         <ejb-ref>
            <ejb-ref-name>ejb/Sender</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>com.panacya.platform.service.bus.sender.SenderHome</home>
            <remote>com.panacya.platform.service.bus.sender.Sender</remote>
            <ejb-link>SenderEJB</ejb-link>
         </ejb-ref>
      </message-driven>

      <message-driven>
         <description>An MDB listening on a topic with a durable subscription.</description>
         <ejb-name>TopicDurableMDB</ejb-name>
         <ejb-class>com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean</ejb-class>
         <messaging-type>javax.jms.MessageListener</messaging-type>
         <transaction-type>Container</transaction-type>
         <activation-config>
            <activation-config-property>
               <activation-config-property-name>destination</activation-config-property-name>
               <activation-config-property-value>topic.testTopic</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>destinationType</activation-config-property-name>
               <activation-config-property-value>javax.jms.Topic</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>acknowledgeMode</activation-config-property-name>
               <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>subscriptionDurability</activation-config-property-name>
               <activation-config-property-value>Durable</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>clientId</activation-config-property-name>
               <activation-config-property-value>foo</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>subscriptionName</activation-config-property-name>
               <activation-config-property-value>bar</activation-config-property-value>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>messageSelector</activation-config-property-name>
               <activation-config-property-value/>
            </activation-config-property>
            <activation-config-property>
               <activation-config-property-name>maxSessions</activation-config-property-name>
               <activation-config-property-value>1</activation-config-property-value>
            </activation-config-property>
         </activation-config>
         <ejb-ref>
            <ejb-ref-name>ejb/Sender</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>com.panacya.platform.service.bus.sender.SenderHome</home>
            <remote>com.panacya.platform.service.bus.sender.Sender</remote>
            <ejb-link>SenderEJB</ejb-link>
         </ejb-ref>
      </message-driven>

   </enterprise-beans>

   <assembly-descriptor>

      <container-transaction>
         <method>
            <ejb-name>QueueListenerMDB</ejb-name>
            <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
      </container-transaction>

      <container-transaction>
         <method>
            <ejb-name>TopicDurableMDB</ejb-name>
            <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
      </container-transaction>

      <container-transaction>
         <method>
            <ejb-name>TopicNonDurableMDB</ejb-name>
            <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
      </container-transaction>

      <container-transaction>
         <method>
            <ejb-name>SenderEJB</ejb-name>
            <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
      </container-transaction>

      <message-destination>
         <message-destination-name>LoggingQueue</message-destination-name>
      </message-destination>

   </assembly-descriptor>
</ejb-jar>

