-->
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.  [ 3 posts ] 
Author Message
 Post subject: Abbruch von Transaktion nach 30 sek
PostPosted: Wed May 10, 2006 5:09 am 
Newbie

Joined: Wed May 10, 2006 4:58 am
Posts: 10
Hallo,

Wir verwenden Hibernate 3.1 mit MySQL 4.1.18 (InnoDB), Tomcat 5.0.28 und JSF RI 1.1_01.

Wir haben das Problem, dass unsere Transaktionen anscheinend einen Timout haben.
Alle Transaktionen bei denen zwischen 2 Statements mehr als ungefähr 30 sek liegen, werden abgebrochen und es wird eine "org.hibernate.exception.GenericJDBCException: could not update: [mapping.EquipmentProperty#100136]" geworfen.

Gibt es einen Parameter den man setzen muss? Ich such mir echt schon einen Wolf?


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>
   <property name="hibernate.c3p0.initial_pool_size">10</property>
   <property name="hibernate.c3p0.min_size">10</property>
   <property name="hibernate.c3p0.max_size">150</property>
   <property name="hibernate.c3p0.timeout">500</property>
   <property name="hibernate.c3p0.max_statements">300</property>
   <property name="hibernate.c3po.idle_test_period">3000</property>
   <property name="hibernate.c3po.max_idle_time">30</property>
   <property name="hibernate.c3po.acquire_increment">3</property>

    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.password">xxx</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/xxx</property>
    <property name="hibernate.connection.username">xxx</property>
    <property name="hibernate.default_schema">xxx</property>
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
    <property name="current_session_context_class">thread</property>
    <!-- this will show us all sql statements -->
    <property name="hibernate.show_sql">false</property>
   
    <property name="hibernate.jdbc.batch_size">30</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.format_sql">true</property>
    <property name="hibernate.jdbc.batch_versioned_data">true</property>
    <property name="hibernate.cache.use_query_cache">false</property>
   
    <mapping resource="mapping/Accessory.hbm.xml"/>
    <mapping resource="mapping/AccessoryCategory.hbm.xml"/>
    <mapping resource="mapping/EquipmentProperty.hbm.xml"/>
    <mapping resource="mapping/Model.hbm.xml"/>
    <mapping resource="mapping/Package.hbm.xml"/>
    <mapping resource="mapping/PackageAccessory.hbm.xml"/>
    <mapping resource="mapping/Series.hbm.xml"/>
    <mapping resource="mapping/Substructure.hbm.xml"/>
    <mapping resource="mapping/SysUser.hbm.xml"/>
    <mapping resource="mapping/TechnicalSpecification.hbm.xml"/>
  </session-factory>
</hibernate-configuration>



Viele Grüße,
Chris


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 20, 2006 5:51 pm 
Newbie

Joined: Wed May 10, 2006 4:58 am
Posts: 10
Na ja,
Echt Schade dass sich hier anscheinend niemand für mein Problem interessiert.


Gruß,
Chris


Top
 Profile  
 
 Post subject: Re: Abbruch von Transaktion nach 30 sek
PostPosted: Tue May 23, 2006 5:41 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
[quote="chris_1982"]Hallo,

Code:
   <property name="hibernate.c3p0.initial_pool_size">10</property>
   <property name="hibernate.c3p0.min_size">10</property>
   <property name="hibernate.c3p0.max_size">150</property>
   <property name="hibernate.c3p0.timeout">500</property>
   <property name="hibernate.c3p0.max_statements">300</property>
   <property name="hibernate.c3po.idle_test_period">3000</property>
   <property name="hibernate.c3po.max_idle_time">30</property>
   <property name="hibernate.c3po.acquire_increment">3</property>



Nicht verzweifeln !
Das liegt sicher an den c3p0 Properties oben.
1. wird c3p0 mit 0 am Ende geschrieben und nicht mit o wie oben teilweise
passiert.
2. Nicht alle Deine Enstellungen werden von Hibernate an c3p0 weitergereicht. Siehe z.B.:

http://www.hibernate.org/214.html

oder die Klasse org.hibernate.cfg.Environment

3. Dokumentation zu c3p0 findest Du hier:

http://www.mchange.com/projects/c3p0/index.html

Allerdings ist ein timeout nach 30 Sekunden schon seltsam.
Bist Du sicher, dass es nicht an der DB liegt ?

_________________
dont forget to rate !


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

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.