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" />
|
|