-->
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: c3po does not work
PostPosted: Thu Jun 09, 2011 2:26 am 
Newbie

Joined: Thu Jul 15, 2010 5:06 am
Posts: 7
Hello!
I have a problem with two of my application. The database connection is always being closed after some hours (about 6 hours). When I restart my applications they are working again. I have configured c3po. This is my hibernate.cfg.xml file:
Code:
<?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="">
   <property name="hibernate.c3p0.min_size">5</property>
    <property name="hibernate.c3p0.max_size">20</property>
    <property name="hibernate.c3p0.timeout">300</property>
    <property name="hibernate.c3p0.max_statements">50</property>
    <property name="hibernate.c3p0.idle_test_period">3000</property>
   
   <property name="connection.url">jdbc:mysql://localhost/Hermed</property>
   <property name="connection.username">root</property>
   <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
   <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
   <property name="connection.password">ncc-2424d</property>
   <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
   <property name="hibernate.jdbc.batch_size">0</property>
   <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
   
    <!--  thread is the short name for
      org.hibernate.context.ThreadLocalSessionContext
      and let Hibernate bind the session automatically to the thread
    -->
    <property name="current_session_context_class">thread</property>
    <!-- this will show us all sql statements -->
    <property name="hibernate.show_sql">true</property>
   
    <!-- automatic creation of tables -->
    <property name="hibernate.hbm2ddl.auto">update</property>

   <!-- mapping files -->
   
   <!-- new mapping files of dmisv21 -->
   <mapping class="at.ac.uibk.dbis.hermed.core.patient.Patient" resource="at/ac/uibk/dbis/hermed/core/patient/Patient.hbm.xml"/>
   <mapping class="at.ac.uibk.dbis.hermed.core.medicine.Medicine" resource="at/ac/uibk/dbis/hermed/core/medicine/Medicine.hbm.xml"/>
   <mapping class="at.ac.uibk.dbis.hermed.core.insurance.Insurer" resource="at/ac/uibk/dbis/hermed/core/insurance/Insurer.hbm.xml"/>
   <mapping class="at.ac.uibk.dbis.hermed.core.cdarepository.CdaDocument" resource="at/ac/uibk/dbis/hermed/core/cdarepository/CdaDocument.hbm.xml"/>
   <mapping class="at.ac.uibk.dbis.hermed.core.templaterepository.Template" resource="at/ac/uibk/dbis/hermed/core/templaterepository/Template.hbm.xml"/>

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


I use hibernate3. Is there a possibility to check if 3cpo is working correctly?

Thanks,
Florian


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.