Ok,
So it seems to me that to use C3P0, you must set the following four paramaters.
hibernate.c3p0.max_size =maximum connection pool size
hibernate.c3p0.min_size = minimum connection pool size
hibernate.c3p0.timeout = maximum idle time
hibernate.c3p0.max_statements =size of statement cache
But when people say you must "enable connection validation", does that mean setting C3P0_VALIDATE_CONNECTION to some very simple query? ie... is C3P0_VALIDATE_CONNECTION the same as DBCP_VALIDATION_QUERY ??? Are there any other params that need to be set to get C3P0 connection pooling working properly and validating connections?
Alternatively, if one chooses to use DBCP and the MySQL autoReconnect=true JDBC URL option, do you still have to set hibernate.dbcp.testOnReturn and hibernate.dbcp.testOnBorrow to true???
Actually, if someone could list exactly what the minimal set of DBCP params are that need to be set (and what are reasonable values for some of these), that would be a big help!!! Right now, i'm using:
"hibernate.dbcp.maxActive" "hibernate.dbcp.maxIdle" "hibernate.dbcp.maxWait" "hibernate.dbcp.testOnBorrow" "hibernate.dbcp.testOnReturn" "hibernate.dbcp.validationQuery"
Do i need to set any others????
thanks,
-dave
Gavin King wrote:
Someone has claimed that this parameter doesn't work if autocommit is disabled (Hibernate always disables autocommit). I don't know if this is true or not.
You can pass autoReconnect=true in the JDBC URL which makes the MySQL-driver attempt to reconnect if the connection dies.
See: http://www.mysql.com/documentation/connector-j/index.html#id2800782
/Ludde
------------------------------------------------------- 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
------------------------------------------------------- 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