ApplicationContext.xml
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd"
default-lazy-init="false">
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="${db_driver}" />
<property name="jdbcUrl" value="${db_url}" />
<property name="user" value="${db_user}" />
<property name="password" value="${db_pass}" />
<property name="minPoolSize" value="1" />
<property name="maxPoolSize" value="1" />
<property name="initialPoolSize" value="1" />
<property name="maxIdleTime" value="1800" />
<property name="acquireIncrement" value="1" />
<property name="idleConnectionTestPeriod" value="10000" />
<property name="acquireRetryAttempts" value="30" />
<property name="testConnectionOnCheckin" value="true" />
<property name="acquireRetryDelay" value="1000"/>
<property name="automaticTestTable" value="c3p0TestTable_jwe"/>
<property name="checkoutTimeout" value="60000"/>
<property name="numHelperThreads" value="5"/>
</bean>
<bean id='configurationBean' class="com.airport.util.Configuration" >
<property name="location" value="file:config/config.properties"/>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="dao" class="com.airport.dao.impl.DaoImpl">
<property name="jdbcTemplate" ref="jdbcTemplate" />
</bean>
</beans>