<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC
    "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">

<beans default-lazy-init="true">
    <!--==========================Property placeholder post-processor==============-->	
    <!-- <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		use recursive mode so can replace any parent bean factory's with my deployable properties -->
    <bean id="placeholderConfig" class="gov.va.med.fw.service.config.RecursivePropertyPlaceholderConfigurer">		
        <property name="locations" value="classpath*:deployenv.properties" />
		<!-- ensure this occurs first -->
		<property name="order">
			<bean id="gov.va.med.fw.service.config.ConfigPriorityOrder.HIGH"
		      class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
		</property>
		<property name="systemPropertiesMode">
			<bean id="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE"
				class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
		</property>	
		<property name="properties">
			<props>
		        <prop key="defaultTransactionTimeout">-1</prop>
				<prop key="isDataClean">true</prop>		
			</props>
		</property>
    </bean>

		
    <!-- ========================= APPLICATION DEFINITIONS ========================= -->
    <!--
      - The message source for this context, loaded from localized "messages_xx" files
      - in the classpath, i.e. "/WEB-INF/classes/messages.properties" or
      - "/WEB-INF/classes/messages_de.properties".
      -
      - "getMessage" calls to this context will use this source.
      - Child contexts can have their own message sources, inheriting all messages from this
      - source, being able to define new messages and override ones defined in this source.
      -->
    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basenames">
            <list>
                <value>ackMessages</value>
            </list>
        </property>
    </bean>

    <!-- ============================================================================ -->
    <bean
        id="messaging.abstractTransactionalBean" parent="common.abstractTransactionalBean" abstract="true">
        <property name="transactionAttributes">
            <props>
                <prop key="process*">PROPAGATION_SUPPORTS</prop>
            </props>
        </property>                     
   </bean>


    <!-- 
      - Configure an application exception handler here.  Each service can provide
      - its own exception handler or use an existing exception handler configured
      - for a whole application.
      -->	
    <bean class="gov.va.med.fw.util.ExceptionHandlerFactory">
        <property name="defaultHandler">
            <bean class="gov.va.med.fw.util.GenericExceptionHandler"/>
        </property>
        <property name="handlers">
            <map>
                <entry key="gov.va.med.fw.service.ServiceConfigurationException">
                    <bean class="gov.va.med.esr.messaging.util.ServiceConfigurationExceptionHandler"/>
                </entry>
            </map>
        </property>
    </bean>	
</beans>