I think this is a mysql issue.
Two clues as to how you should set things up
1) you need to set autoreconnect to true for MySQL in the url.
Please see
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
and look at the MySQL example, specifically,
<parameter>
      <name>url</name>

<value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
    </parameter>

2) Look at this and see if this is your issue:
http://raibledesigns.com/page/rd/20030821
and look at the comments on the MySQL issue
Thanks,
Steve

Dave Tilley wrote:

Ok, I am trying to get DBCP connection pooling working reliably (and not dropping connections)...so far i am not having much success. After a period of several hours of non-use, Hibernate will generate the familiar ioExcpetion when the connections are timed out.


With that in mind, can someone give me a definitive list of DBCP params that are required to be set to get this working, along with some reasonable values???

Right now, i'm using:

"hibernate.dbcp.maxActive"
"hibernate.dbcp.maxIdle"
"hibernate.dbcp.maxWait"
"hibernate.dbcp.testOnBorrow" -> true
"hibernate.dbcp.testOnReturn" -> true
"hibernate.dbcp.validationQuery"

Do i need to set any others???? Are there any other tricks to getting DBCP working with Hibernate that i need to know?

I have tried using C3P0 and also fooled around with this autoreconnect=true URL, but i have given up on both of these options and would like to get DBCP configured "the right way".


I would *really* appreciate some guidance with this -- i will be happy to summarize what i learn and submit it for a FAQ or something if that will help so others will have this well-documented online somewhere.



Many thanks,


-dave






------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to