Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
       xmlns:t="http://dnetlib.eu/springbeans/t"
5
       xmlns:tx="http://www.springframework.org/schema/tx"
6
       xmlns:task="http://www.springframework.org/schema/task"
7
       xmlns:aop="http://www.springframework.org/schema/aop"
8
       xmlns:context="http://www.springframework.org/schema/context"
9

    
10
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
11
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
12
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
13
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
14

    
15

    
16

    
17

    
18
    <task:annotation-driven executor="myExecutor" scheduler="myScheduler"/>
19
    <task:executor id="myExecutor" pool-size="5"/>
20
    <task:scheduler id="myScheduler" pool-size="10"/>
21

    
22
    <bean id="maillib" class="eu.dnetlib.utils.MailLibrary" init-method="init">
23
        <property name="mailhost" value="${services.validator.mail.host}"/>
24
        <property name="smtpPort" value="${services.validator.mail.port}"/>
25
        <property name="authenticate" value="${services.validator.mail.authenticate}"/>
26
        <property name="username" value="${services.validator.mail.username}"/>
27
        <property name="password" value="${services.validator.mail.password}"/>
28
        <property name="from" value="${services.validator.mail.fromAddress}"/>
29
        <property name="replyTo" value="${services.validator.mail.replyToAddress}"/>
30
        <property name="mode" value="${services.validator.mail.mode}"/>
31
        <property name="debug" value="${services.validator.mail.debug}"/>
32
    </bean>
33

    
34
    <bean id="validationService" class="eu.dnetlib.repo.manager.server.services.ValidationServiceImpl">
35
        <property name="validatorServiceLocator" ref="validatorServiceLocator"/>
36
    </bean>
37

    
38
    <bean id="repomanager.dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
39
        <property name="driverClassName" value="${repomanager.db.driverClassName}" />
40
        <property name="url" value="${repomanager.db.url}" />
41
        <property name="username" value="${repomanager.db.username}" />
42
        <property name="password" value="${repomanager.db.password}" />
43
        <property name="maxIdle" value="10" />
44
        <property name="maxActive" value="100" />
45
        <property name="maxWait" value="10000" />
46
        <property name="validationQuery" value="SELECT 1;" />
47
        <property name="testOnBorrow" value="true" />
48
        <property name="testOnReturn" value="true" />
49
        <property name="testWhileIdle" value="true" />
50
        <property name="timeBetweenEvictionRunsMillis" value="1200000" />
51
        <property name="minEvictableIdleTimeMillis" value="1800000" />
52
        <property name="numTestsPerEvictionRun" value="5" />
53
        <property name="poolPreparedStatements" value="true" />
54
        <property name="defaultAutoCommit" value="true" />
55
    </bean>
56

    
57
    <aop:aspectj-autoproxy proxy-target-class="true" />
58
    <tx:annotation-driven transaction-manager="txManager"/>
59

    
60
    <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
61
        <property name="dataSource" ref="repomanager.dataSource"/>
62
    </bean>
63
</beans>
(2-2/2)