spring整合hibernate,使用c3p0连接池配置

<bean id="dataSource"
		class="com.mchange.v2.c3p0.ComboPooledDataSource"
		destroy-method="close">
		<property name="driverClass"
			value="net.sourceforge.jtds.jdbc.Driver">
		</property>
		<property name="jdbcUrl"
			value="jdbc:jtds:sqlserver://127.0.0.1;DatabaseName=testdb">
		</property>
		<property name="user" value="sa"></property>
		<property name="password" value="sa"></property>
		<property name="maxPoolSize" value="50"></property>
		<property name="minPoolSize" value="5"></property>
		<property name="initialPoolSize" value="5"></property>
		<property name="acquireIncrement" value="5"></property>
		<property name="maxIdleTime" value="20"></property>
	</bean>

 

你可能感兴趣的:(spring,.net,Hibernate,bean,jdbc)