<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource"
class="oracle.jdbc.pool.OracleConnectionCacheImpl">
<property name="driverType"
value="oracle.jdbc.driver.OracleDriver" />
<property name="URL"
value="jdbc:oracle:thin:@192.168.10.27:1521:orcl2" />
<property name="user" value="gcrm" />
<property name="password" value="gcrm" />
<property name="minLimit" value='1' />
<property name="maxLimit" value='5' />
<property name="cacheScheme" value='1' />
<property name="cacheFixedWaitIdleTime" value='30' />
<property name="cacheFixedWaitTimeout" value='30' />
<property name="cacheInactivityTimeout" value='3600' />
<!-- 连接最大活动时间,即一个SQL语句最长的执行时间 -->
<property name="cacheTimeToLiveTimeout" value="60" />
<!-- 连接池维护线程检测间隔时间 -->
<property name="threadWakeUpInterval" value="60" />
<!-- 缓存数量 -->
<property name="stmtCacheSize" value="120" />
</bean>
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>
classpath:com/together/SqlMapConfig.xml
</value>
</property>
<property name="useTransactionAwareDataSource">
<value>true</value>
</property>
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>
<bean id="sqlMapClientTemplate"
class="org.springframework.orm.ibatis.SqlMapClientTemplate">
<property name="sqlMapClient">
<ref bean="sqlMapClient" />
</property>
</bean>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:spring.properties" />
</bean>
<bean id="MapUserDAO" class="com.together.dao.UserDAO">
<property name="sqlMapClient" ref="sqlMapClient"/>
</bean>
<bean id="MapUserService" class="com.together.service.UserService">
<constructor-arg index="0" ref="MapUserDAO"/>
</bean>
<bean name="/login" class="com.together.action.LoginAction">
<constructor-arg index="0" ref="MapUserService"/>
</bean>
</beans>