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...
|