-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: about c3p0 configuration in hibernate
PostPosted: Fri Jun 04, 2010 2:38 am 
Beginner
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&amp;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.

Top
 Profile  
 
 Post subject: Re: about c3p0 configuration in hibernate
PostPosted: Sat Jun 05, 2010 5:14 am 
Beginner
Beginner

Joined: Mon Oct 27, 2008 6:26 am
Posts: 36
could anyone tell me?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.