All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ao4comm.1.0.source-code.applicationContextDao.xml Maven / Gradle / Ivy

There is a newer version: 1.0.11
Show newest version
<?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:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    
    <context:property-placeholder location="classpath:myconf.properties"/>
    <context:component-scan base-package="com.mycomm.dao.dao4house"/>
    <context:annotation-config/>
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <property name="user" value="${jdbc.user}"></property>
        <property name="password" value="${jdbc.password}"></property>
        <property name="driverClass" value="${jdbc.driverClass}"></property>
        <property name="jdbcUrl" value="${jdbc.url}"></property>
        <!-- 指定连接数据库连接池的最小连接数 -->
        <property name="minPoolSize" value="10" />
        <!-- 指定连接数据库连接池的最大连接数 -->
        <property name="maxPoolSize" value="30" />
        <!-- 指定连接数据库连接池的连接的最大空闲时间 -->
        <property name="maxIdleTime" value="1800" />
        <property name="acquireIncrement" value="2" />
        <property name="maxStatements" value="0" />
        <!-- 指定连接数据库连接池的初始化连接数 -->
        <property name="initialPoolSize" value="20" />
        <property name="idleConnectionTestPeriod" value="1800" />
        <property name="acquireRetryAttempts" value="30" />
        <property name="breakAfterAcquireFailure" value="true" />
        <property name="testConnectionOnCheckout" value="false" />
    </bean>
    <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
        <property name="dataSource" ref="dataSource"></property>
    </bean>
    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource"></property>
    </bean>
    <bean id="myOrmSession" class="com.mycomm.dao.dao4comm.orm.impl.MyOrmSession">        
    </bean>
    <bean id="testMyEntityManager" class="com.mycomm.dao.dao4house.TestMyEntityManager">        
    </bean>
    <!--        <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="false"/>-->
    
   
  

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy