<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

	
	<bean id="filterFactory" class="gov.va.med.cds.filter.DefaultCdsFilterFactory" />

	<bean id="filterManager" class="gov.va.med.cds.filter.FilterManager">
		<constructor-arg index="0" ref="filterService" />
		<constructor-arg index="1" ref="filterCachePersistence" />
		<constructor-arg index="2" ref="filterMemoryCache" />
	</bean>

	<bean id="filterCachePersistence" class="gov.va.med.cds.filter.HibernateOracleFilterCachePersistence">
		<property name="sessionFactory" ref="hdr2TfsSessionFactory"/>
	</bean>

	<bean id="filterService" class="gov.va.med.cds.filter.FilterServiceSimulator" >
		<!-- If this property is missing, test templates won't be loaded -->
		<property name="testFilters">
			<props>
				<!--
					If this prop is missing, then it will default to the local directory ("./")
					This can be either a path to a single file or a directory containing files
					with the suffix .meta.  Each file contains information about where the
					template jar file is located and metadata about the template as NVP.
				-->
				<prop key="path">filtercache</prop>
				<!-- If not included, the default for this property is "false" -->
				<prop key="loadTestFilters">true</prop>
			</props>
		</property>
	</bean>

	<bean id="filterMemoryCache" class="gov.va.med.cds.filter.FilterMemoryCache">
		<constructor-arg>
			<bean class="gov.va.med.cds.util.LRUHashMap">
				<!-- LRU cache size -->
				<constructor-arg index="0" value="200" />
			</bean>
		</constructor-arg>
	</bean>

	<bean id="filterManagerMBeanExporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
		<property name="beans">
			<map>
				<entry key="gov.va.med.cds.filter:name=cds-filter-manager" value-ref="filterManager" />
			</map>
		</property>
		<property name="assembler">
			<bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
				<property name="interfaceMappings">
					<props>
						<prop key="gov.va.med.cds.filter:name=cds-filter-manager">
							gov.va.med.cds.filter.FilterManagerMBeanInterface
						</prop>
					</props>
				</property>
			</bean>
		</property>
		<property name="server" ref="mbeanServer" />
		<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
	</bean>
	
	<bean id="applicationName" class="java.lang.String">
		<constructor-arg value="test" />
	</bean>

</beans>
