-->
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.  [ 1 post ] 
Author Message
 Post subject: Connection Pooling with Spring+JPA+hibernate ?
PostPosted: Sun May 24, 2009 4:24 am 
Newbie

Joined: Sun May 24, 2009 4:12 am
Posts: 1
My EntityManager FActory ..

<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerE ntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.Hibernat eJpaVendorAdapter">
<property name="database" value="MYSQL" />
<property name="showSql" value="true" />
</bean>
</property>
</bean>


My datasource
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/<DBNAME>" />
<property name="username" value="<USER>" /> <property name="password"
value="<PASSWORD>" /> </bean>




Now how do i set my connection pooling properties using c3po


I put c3p0 jar into my classpath .



I tried adding hibernate.properties with the connection pooling valuse in classpath it didnt pick up .


Also tried to add the below into my entityManagerFactory ,still it didnt pickup .How can i set connection pooling values ?

<property name="jpaPropertyMap">
<entry key="hibernate.dialect" value="net.sf.hibernate.dialect.MySQLDialect" />
<entry key="hibernate.show_sql" value="false" />
<entry key="hibernate.c3p0.min_size" value="5" />
<entry key="hibernate.c3p0.max_size" value="10" />
<entry key="hibernate.c3p0.timeout" value="1800" />
<entry key="hibernate.c3p0.max_statements" value="50" />


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

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.