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:context="http://www.springframework.org/schema/context"
5
       xmlns:tx="http://www.springframework.org/schema/tx"
6
       xsi:schemaLocation="http://www.springframework.org/schema/beans
7
               http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
8
        	http://www.springframework.org/schema/context
9
        	http://www.springframework.org/schema/context/spring-context-4.0.xsd
10
        	http://www.springframework.org/schema/tx
11
        	http://www.springframework.org/schema/tx/spring-tx.xsd">
12

    
13

    
14
    <context:property-placeholder location="classpath*:/eu/**/application.properties" />
15
    <context:annotation-config/>
16
    <context:component-scan base-package="eu.dnetlib.repo.manager.service.config"/>
17
    <tx:annotation-driven transaction-manager="txManager"/>
18

    
19
    <bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader"
20
          id="propertyLoader">
21
        <property name="order" value="2"/>
22
        <property name="properties">
23
            <bean class="eu.dnetlib.conf.WebappContextProperyFactory">
24
                <property name="propertyFetcher">
25
                    <bean class="eu.dnetlib.conf.PropertyFetcher"/>
26
                </property>
27
            </bean>
28
        </property>
29
        <property name="ignoreUnresolvablePlaceholders" value="true"/>
30
        <property name="locations">
31
            <list>
32
                <value>classpath*:/gr/**/springContext-*.properties</value>
33
                <value>classpath*:/eu/**/springContext-*.properties</value>
34

    
35
                <value>classpath*:/eu/dnetlib/repo/manager/service/email-texts.properties</value>
36

    
37
                <value>classpath*:dnet-site-wizard.properties</value>
38
                <value>classpath*:dnet-site-override.properties</value>
39
                <value>classpath*:dnet-wizard.properties</value>
40
                <value>classpath*:dnet-override.properties</value>
41
                <value>classpath*:dnet-validator-wizard.properties</value>
42
                <value>classpath*:dnet-validator-override.properties</value>
43
                <value>classpath*:dnet-site-force-override.properties</value>
44
                <value>classpath*:dnet-force-override.properties</value>
45
            </list>
46
        </property>
47
    </bean>
48

    
49
    <bean id="repomanager.dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
50
        <property name="driverClassName" value="${repomanager.db.driverClassName}" />
51
        <property name="url" value="${repomanager.db.url}" />
52
        <property name="username" value="${repomanager.db.username}" />
53
        <property name="password" value="${repomanager.db.password}" />
54
        <property name="maxIdle" value="10" />
55
        <property name="maxActive" value="100" />
56
        <property name="maxWait" value="10000" />
57
        <property name="validationQuery" value="SELECT 1;" />
58
        <property name="testOnBorrow" value="true" />
59
        <property name="testOnReturn" value="true" />
60
        <property name="testWhileIdle" value="true" />
61
        <property name="timeBetweenEvictionRunsMillis" value="1200000" />
62
        <property name="minEvictableIdleTimeMillis" value="1800000" />
63
        <property name="numTestsPerEvictionRun" value="5" />
64
        <property name="poolPreparedStatements" value="true" />
65
        <property name="defaultAutoCommit" value="true" />
66
    </bean>
67

    
68
    <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
69
        <property name="dataSource" ref="repomanager.dataSource"/>
70
    </bean>
71

    
72
</beans>
    (1-1/1)