<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:aop="http://www.springframework.org/schema/aop" xmlns="http://www.springframework.org/schema/beans"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
	
	<aop:config>
		<aop:pointcut id="tfrReadTemplateTxMethods" expression="execution(* gov.va.med.cds.template.TemplateCachePersistenceInterface.*(..))"/>
		<aop:advisor advice-ref="tfrReadTemplateTxAdvice"  pointcut-ref="tfrReadTemplateTxMethods" order="1"/>
	</aop:config>

	<tx:advice id="tfrReadTemplateTxAdvice" transaction-manager="hdr2TransactionManager">
		<tx:attributes>
			<tx:method name="loadTemplateIntoCache" propagation="SUPPORTS" isolation="READ_COMMITTED"
				read-only="true" />
			<tx:method name="loadAllTemplatesIntoCache" propagation="SUPPORTS" isolation="READ_COMMITTED"
				read-only="true" />
		</tx:attributes>
	</tx:advice>

	<aop:config>
		<aop:pointcut id="tfrReadFilterTxMethods" expression="execution(* gov.va.med.cds.filter.FilterCachePersistenceInterface.*(..))"/>
		<aop:advisor advice-ref="tfrReadFilterTxAdvice"  pointcut-ref="tfrReadFilterTxMethods" order="1"/>
	</aop:config>

	<tx:advice id="tfrReadFilterTxAdvice" transaction-manager="hdr2TransactionManager">
		<tx:attributes>
			<tx:method name="loadFilterIntoMemoryCache" propagation="SUPPORTS" isolation="READ_COMMITTED"
				read-only="true" />
			<tx:method name="loadAllFilterSchemasIntoMemoryCache" propagation="SUPPORTS" isolation="READ_COMMITTED"
				read-only="true" />
			<tx:method name="getFilterIdentifiers" propagation="SUPPORTS" isolation="READ_COMMITTED"
				read-only="true" />
		</tx:attributes>
	</tx:advice>
	
	<util:map id="templateTimeoutMap">
		<entry key="NonVAMedicationsRead2-NonVaMedicationEvent" value="60" />
		<entry key="TiuDocumentListRead2-ClinicalDocumentEvent" value="60" />
		<entry key="TiuDocumentDetailRead2-ClinicalDocumentEvent" value="60" />
		<entry key="AllergiesRead40010-AllergyAssessment" value="60" />
		<entry key="AllergiesRead40010-IntoleranceCondition" value="60" />
		<entry key="AllergyAssessmentRead40010-AllergyAssessment" value="60" />
		<entry key="IntoleranceConditionRead40010-IntoleranceCondition" value="60" />
		<entry key="IntoleranceConditionReducedRead40011-IntoleranceCondition" value="60" />
		<entry key="VWIntoleranceConditionRead40010-IntoleranceCondition" value="60" />
		<entry key="MHVIntoleranceConditionRead40011-IntoleranceCondition" value="60" />
		<entry key="VWAllergiesRead40010-IntoleranceCondition" value="60" />
		<entry key="VWAllergiesRead40010-AllergyAssessment" value="60" />
		<entry key="VitalsignsRead40010-VitalSignObservationEvent" value="60" />
		<entry key="VWVitalsignsRead40010-VitalSignObservationEvent" value="60" />
		<entry key="ImmunizationRead3-ImmunizationEvent" value="60" />
		<entry key="SkintestRead3-SkinTestProcedure" value="60" />
		<entry key="ProblemListRead2-HealthConcern" value="60" />
		<entry key="RequestsAndExamsRead1-ExamRequest2507" value="60" />
		<entry key="RequestsAndExamsRead1-Exam2507" value="60" />
		<entry key="RequestsAndExamsRead2-ExamRequest2507" value="60" />
		<entry key="RequestsAndExamsRead2-Exam2507" value="60" />		
		<entry key="AppointmentsRead1-Appointment" value="60" />
		<entry key="upperLimitTimeout" value="300" />
    </util:map>

</beans>
