-->
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: How to have unlimited queries --- Hibernate - c3p0`
PostPosted: Sun Jul 08, 2012 1:38 pm 
Newbie

Joined: Sun Jul 08, 2012 1:12 pm
Posts: 1
Hi , I have one Hibernate config file , and one c3p0 properties , the problem is, it does not allow me to have continuous inserting and retrieving the data , after some time my query does not able to retrieve or insert anything to the database, in short it stops talking to database ... i believe i have some mistake in cfg file ---- here is cfg file ---

---------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" >
<hibernate-configuration>
<session-factory name="sessionFactory1">
<property name="show_sql">false</property>
<property name="format_sql">false</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="current_session_context_class">thread</property>
<property name="hibernate.generate_statistics">false</property>
<property name="hbm2ddl.auto">update</property>

<property name="use_sql_comments">false</property>

<property name="c3p0.min_size">5</property>
<property name="c3p0.max_size">10000000</property>


<property name="c3p0.timeout">300</property>
<property name="c3p0.max_statements">50</property>
<property name="hibernate.connection.url">
jdbc:mysql://localhost:3306/XXXXXXXXXXXXX
</property>
<property name="connection.username">XXXXXXX</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="connection.password">XXXXXXXX</property>
<property name="jdbc.batch_size">1000000</property>
<property name="cache.use_second_level_cache">false</property>
<mapping
resource="rtem/com/em/accountant/mapping/ExpanseFavorType.hbm.xml" />

<mapping
resource="rtem/com/em/event/mapping/EventExpanseUpdate.hbm.xml" />
<mapping resource="rtem/com/developer/mapping/Developer.hbm.xml" />
<mapping resource="rtem/com/em/event/mapping/Discount.hbm.xml" />
<mapping resource="rtem/com/em/event/mapping/Tax.hbm.xml" />
<mapping resource="rtem/com/em/event/mapping/TAndC.hbm.xml" />


</session-factory>
</hibernate-configuration>

-----------------------


and the c3p0 properties file is ---

# c3p0.properties
c3p0.testConnectionOnCheckout=true
c3p0.preferredTestQuery=SELECT 1


------

i believe i have mis wriite the values of few or may be one attribute ---


<property name="c3p0.min_size">5</property>
<property name="c3p0.max_size">10000000</property>


<property name="jdbc.batch_size">1000000</property>



please suggest me ...how to have unlimited talkings to Database ...Thanks in Advance...


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.