<?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:context="http://www.springframework.org/schema/context"
	xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:template="http://dnetlib.eu/springbeans/template" xmlns:t="http://dnetlib.eu/springbeans/t"
	xmlns:tx="http://www.springframework.org/schema/tx"

	xsi:schemaLocation="
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
        http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"
	default-autowire="no">

	<bean id="repoApiDms" class="eu.dnetlib.repos.RepoApiDmsImpl">
		<property name="dmService" ref="datasourceManagerServiceLocator" />
	</bean>

	<bean id="repoAPI" class="eu.dnetlib.repos.RepoApiCacheImpl" depends-on="datasourceManagerServiceLocator">
		<property name="cacheProvider" ref="cacheProvider" />
		<property name="coreRepoApi" ref="repoApiDms" />
	</bean>

	<!--<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">-->
    	<!--<property name="configLocation"  value="/eu/dnetlib/repos/ehcacher/repos-ehcache.xml"/>-->
	<!--</bean>-->

	<bean id="cacheEntryFactory" class="eu.dnetlib.repos.ehcacher.CacheEntryFactoryImpl">
		<property name="repoAPI" ref="repoApiDms" />
	</bean>

	<bean id="cacheProvider" class="eu.dnetlib.repos.ehcacher.CacheProvider" scope="singleton" init-method="start">
    	<property name="cacheManager" ref="cacheManager" />
    	<property name="updatingFactory" ref="cacheEntryFactory" />
	</bean>

</beans>
<!-- 	<bean id="joomla.dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> -->
<!-- 		<property name="driverClassName" value="${services.validator.joomla.driverClassName}" /> -->
<!-- 		<property name="url" value="${services.validator.joomla.url}" /> -->
<!-- 		<property name="username" value="${services.validator.joomla.username}" /> -->
<!-- 		<property name="password" value="${services.validator.joomla.password}" /> -->

<!-- 		<property name="maxIdle" value="10"/> -->
<!-- 		<property name="maxActive" value="100"/> -->
<!-- 		<property name="maxWait" value="10000"/> -->
<!-- 		<property name="validationQuery" value="select 1"/> -->
<!-- 		<property name="testOnBorrow" value="true"/> -->
<!-- 		<property name="testWhileIdle" value="true"/> -->
<!-- 		<property name="timeBetweenEvictionRunsMillis" value="1200000"/> -->
<!-- 		<property name="minEvictableIdleTimeMillis" value="1800000"/> -->
<!-- 		<property name="numTestsPerEvictionRun" value="5"/> -->
<!-- 		<property name="defaultAutoCommit" value="false"/> -->
<!-- 	</bean> -->


<!-- 	<bean id="joomla2ldap" class="gr.uoa.di.validator.api.ldap.Joomla2Ldap"> -->
<!-- 		<property name="joomlaDatasource" ref="joomla.dataSource" /> -->
<!-- 		<property name="ldapAddress" value="${services.validator.ldap.address}" /> -->
<!-- 		<property name="ldapPort" value="${services.validator.ldap.port}" /> -->
<!-- 		<property name="ldapUsername" value="${services.validator.ldap.username}" /> -->
<!-- 		<property name="ldapPassword" value="${services.validator.ldap.password}" /> -->
<!-- 		<property name="ldapUsersDN" value="${services.validator.ldap.usersDN}" /> -->
<!-- 	</bean> -->
