-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problem with my architecture (connection pool)
PostPosted: Tue Sep 21, 2004 5:05 pm 
Newbie

Joined: Wed Jul 28, 2004 8:03 am
Posts: 8
Location: Porto Alegre - Brazil
Hibernate version:
2.1.6


Hi friends,
Well, I have the follow problem with my opensource project ( javaBB ).

My server have a limit for clear idle's connections in mySQL (1 hour for execute the clear), and my connection at connection pool stay idle another some seconds of execute my sql's (2 seconds I think).
I know that these idle connection stay here because my "min-connection/max-connection" in my connection pool, but if my application stay stop for 2 hours and mysql clear these connections? Sux :(
I try test this "killing" via MySQL Administrator the open connections and the result is catastrophic!!

Code:
ERROR [http-8080-Processor25] (JDBCExceptionReporter.java:46) - Communication link failure: java.net.SocketException
ERROR [http-8080-Processor25] (JDBCExceptionReporter.java:46) - Communication link failure: java.net.SocketException
ERROR [http-8080-Processor25] (JDBCException.java:38) - Could not execute query
java.sql.SQLException: Communication link failure: java.net.SocketException


I stay using DBCP (dbcp is good for work with hibernate?).

Code:
        <property name="hibernate.dbcp.maxActive">30</property>
        <property name="hibernate.dbcp.whenExhaustedAction">2</property>       
        <property name="hibernate.dbcp.maxWait">30</property>
        <property name="hibernate.dbcp.maxIdle">10</property>
      <property name="hibernate.dbcp.removeAbandoned">true</property>
      <property name="hibernate.dbcp.removeAbandonedTimeout">29</property>
      <property name="hibernate.dbcp.logAbandoned">true</property>


Well, these configurations in my xml at dbcp are only tests, why I have testing a lot all's configurations possible :(

My HibernateSessionFactory and my HibernateDAO

Thanks for any help!

Cya!

_________________
Dalton Camargo
JEE Software Architect
JavaFree.org Founder
JavaBB.org Owner
Technical Revisor of Spring in Action the Book to Portuguese


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 21, 2004 5:14 pm 
Newbie

Joined: Wed Jul 28, 2004 8:03 am
Posts: 8
Location: Porto Alegre - Brazil
Uouuuuuuu..
My brazilians brother Volnei answer for me at JavaFree.org.


The solution is put autoReconnect=true in string of connection at hibernate.cfg.xml.

;)

Thanks

_________________
Dalton Camargo
JEE Software Architect
JavaFree.org Founder
JavaBB.org Owner
Technical Revisor of Spring in Action the Book to Portuguese


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.