<?xml version='1.0' encoding='UTF-8'?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version = "3.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
    
    <enterprise-beans>
        <message-driven>
            <ejb-name>LoggerMessageDrivenBean</ejb-name>
            <ejb-class>gov.va.med.cds.logger.LoggerMessageDrivenBean</ejb-class>
            <transaction-type>Container</transaction-type>

            <activation-config>
                <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>subscriptionDurability</activation-config-property-name>
                    <activation-config-property-value>Durable</activation-config-property-value>
                </activation-config-property>
            </activation-config>

            <resource-ref>
                <description></description>
                <res-ref-name>jms/cds/LoggerConnectionFactory</res-ref-name>
                <res-type>javax.jms.XAQueueConnectionFactory</res-type>
                <res-auth>Container</res-auth>
                <res-sharing-scope>Shareable</res-sharing-scope>
            </resource-ref>
        </message-driven>
        
        <message-driven>

            <ejb-name>ReadAuditMessageDrivenBean</ejb-name>
            <ejb-class>gov.va.med.cds.logger.ReadAuditMessageDrivenBean</ejb-class>
            <transaction-type>Container</transaction-type>

            <activation-config>
                <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>subscriptionDurability</activation-config-property-name>
                    <activation-config-property-value>Durable</activation-config-property-value>
                </activation-config-property>
            </activation-config>

            <env-entry>
                <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
                <env-entry-value>beanRefContext.xml</env-entry-value>
            </env-entry>
            
            <env-entry>
                <env-entry-name>ejb/AuditLogPersistenceManagerBeanId</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
                <env-entry-value>cdsHibernateAuditLogPersistenceManager</env-entry-value>
            </env-entry>

            <resource-ref>
                <description></description>
                <res-ref-name>jms/cds/LoggerConnectionFactory</res-ref-name>
                <res-type>javax.jms.XAQueueConnectionFactory</res-type>
                <res-auth>Container</res-auth>
                <res-sharing-scope>Shareable</res-sharing-scope>
            </resource-ref>
        </message-driven>
        
        <message-driven>
            <ejb-name>ReadRpcAuditMessageDrivenBean</ejb-name>
            <ejb-class>gov.va.med.cds.logger.ReadAuditMessageDrivenBean</ejb-class>
            <transaction-type>Container</transaction-type>

            <activation-config>
                <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>subscriptionDurability</activation-config-property-name>
                    <activation-config-property-value>Durable</activation-config-property-value>
                </activation-config-property>
            </activation-config>

            <env-entry>
                <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
                <env-entry-value>beanRefContext.xml</env-entry-value>
            </env-entry>
            
            <env-entry>
                <env-entry-name>ejb/AuditLogPersistenceManagerBeanId</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
                <env-entry-value>rpcHibernateAuditLogPersistenceManager</env-entry-value>
            </env-entry>

            <resource-ref>
                <description></description>
                <res-ref-name>jms/cds/LoggerConnectionFactory</res-ref-name>
                <res-type>javax.jms.XAQueueConnectionFactory</res-type>
                <res-auth>Container</res-auth>
                <res-sharing-scope>Shareable</res-sharing-scope>
            </resource-ref>
        </message-driven>
        
    </enterprise-beans>

    <assembly-descriptor>
        <container-transaction>
            <method>
                <ejb-name>LoggerMessageDrivenBean</ejb-name>
                <method-name>onMessage</method-name>
                <method-params>
                    <method-param>javax.jms.Message</method-param>
                </method-params>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>

        <container-transaction>
            <method>
                <ejb-name>ReadAuditMessageDrivenBean</ejb-name>
                <method-name>onMessage</method-name>
                <method-params>
                    <method-param>javax.jms.Message</method-param>
                </method-params>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
        
        <container-transaction>
            <method>
                <ejb-name>ReadRpcAuditMessageDrivenBean</ejb-name>
                <method-name>onMessage</method-name>
                <method-params>
                    <method-param>javax.jms.Message</method-param>
                </method-params>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
    </assembly-descriptor>
    
</ejb-jar>
