Beginner |
|
Joined: Mon Oct 27, 2008 6:26 am Posts: 36
|
I am configuring sessionFactory as following:
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3306/testdb?useCursorFetch=true&useServerPrepStmts=true"/> <property name="username" value="root"/> <property name="password" value=""/> </bean>
<!-- Hibernate SessionFactory --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"><ref local="dataSource"/></property> <property name="mappingResources"> <list> <!-- Write here your list of Hibernate files --> <value>hibernate/catalogue/Article.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">${hibernate.dialect}</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.c3p0.minPoolSize">${hibernate.c3p0.minPoolSize}</prop> <prop key="hibernate.c3p0.maxPoolSize">${hibernate.c3p0.maxPoolSize}</prop> <prop key="hibernate.c3p0.timeout">${hibernate.c3p0.timeout}</prop> <prop key="hibernate.c3p0.max_statement">${hibernate.c3p0.max_statement}</prop> <prop key="hibernate.generate_statistics">true</prop> <prop key="hibernate.cache.use_query_cache">true</prop> </props> </property> </bean>
I wonder if I am using c3p0 connection pool or not?
thanks
Ian
Last edited by yiwong2001 on Tue Jun 08, 2010 4:58 am, edited 1 time in total.
|
|