<?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-3.0.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">

	<bean id="censusTransformationAcknowledgementPersistenceManager" class="gov.va.med.cds.scheduler.persistence.CensusTransformationAcknowledgementPersistenceManager">
		<property name="sessionFactory" ref="sessionFactory"/>
		<property name="censusAcknowledgementWork" ref="censusAcknowledgementWork" />
	</bean>

	<bean id="expiredCensusReportAcknowledgementPersistenceManager" class="gov.va.med.cds.scheduler.persistence.ExpiredCensusReportAcknowledgementPersistenceManager">
		<property name="sessionFactory" ref="sessionFactory"/>
		<property name="censusAcknowledgementWork" ref="censusAcknowledgementWork" />
	</bean>
	
	<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
		<property name="dataSource" ref="hdrDataSource" />
		<property name="mappingResources">
			<list>
				<value>gov/va/med/cds/scheduler/persistence/hibernate/CensusAcknowledgementResponse.hbm.xml</value>
				<value>gov/va/med/cds/scheduler/persistence/hibernate/CensusMasterIngest.hbm.xml</value>
				<value>gov/va/med/cds/scheduler/persistence/hibernate/CensusCompleteWeek.hbm.xml</value>
				
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
				<prop key="hibernate.show_sql">false</prop>
			</props>
		</property>
	</bean>
 
 	<aop:config>
		<aop:pointcut id="censusTransformAckTxMethods" expression="execution(* gov.va.med.cds.scheduler.persistence.CensusTransformationAcknowledgementPersistenceInterface.*(..))"/>
		<aop:advisor advice-ref="censusTransformAckTxAdvice"  pointcut-ref="censusTransformAckTxMethods" order="1"/>
	</aop:config>

	<tx:advice id="censusTransformAckTxAdvice" transaction-manager="auditLogClobStoreTransactionManager">
		<tx:attributes>
			<tx:method name="*" propagation="REQUIRED" isolation="READ_COMMITTED" />
		</tx:attributes>
	</tx:advice>

 	<aop:config>
		<aop:pointcut id="expiredCensusRepAckTxMethods" expression="execution(* gov.va.med.cds.scheduler.persistence.ExpiredCensusReportAcknowledgementPersistenceInterface.*(..))"/>
		<aop:advisor advice-ref="expiredCensusRepAckTxAdvice"  pointcut-ref="expiredCensusRepAckTxMethods" order="1"/>
	</aop:config>

	<tx:advice id="expiredCensusRepAckTxAdvice" transaction-manager="auditLogClobStoreTransactionManager">
		<tx:attributes>
			<tx:method name="*" propagation="REQUIRED" isolation="READ_COMMITTED" />
		</tx:attributes>
	</tx:advice>

</beans>
