<?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="openaire.dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
		<property name="driverClassName" value="${services.validator.openaire.driverClassName}" />
		<property name="url" value="${services.validator.openaire.url}" />
		<property name="username" value="${services.validator.openaire.username}" />
		<property name="password" value="${services.validator.openaire.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="openaire.repositoryFactory" class="eu.dnetlib.repos.RepoApiDirectImpl">
		<property name="openAireDataSource" ref="openaire.dataSource" />
	</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.users.ldap.address}" /> -->
<!-- 		<property name="ldapPort" value="${services.users.ldap.port}" /> -->
<!-- 		<property name="ldapUsername" value="${services.users.ldap.username}" /> -->
<!-- 		<property name="ldapPassword" value="${services.users.ldap.password}" /> -->
<!-- 		<property name="ldapUsersDN" value="${services.users.ldap.usersDN}" /> -->
<!-- 	</bean> -->
