我正在使用 spring/hibernate 集成应用程序。我已经配置了 c3p0 连接池。我正在使用 c3p0 组合池数据源。我应该在哪里指定组合池数据源属性?
在这个部分?
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="mappingLocations" value="classpath:hibernate-mapping.xml" />
<property name="hibernateProperties">
<props>
**//Here do I need to specify combopooled datasource properties?
//like acquireIncrement
acquireRetryAttempts
acquireRetryDelay
preferredTestQuery
maxPoolSize...etc**
</props>
</property>
<property name="dataSource" ref="dataSource" />
</bean>
还是这里?
<bean id="rootDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${jdbc.driver}" />
<property name="jdbcUrl" value="${jdbc.url}" />
<property name="user" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
**//Here do i need to specify combopooled datasource properties?
//like acquireIncrement
acquireRetryAttempts
acquireRetryDelay
preferredTestQuery**
maxPoolSize...etc
</bean>
请给我建议。
谢谢!