[Hibernate] Connection Pooling / Connection Validation - best practices?

2003-08-27 Thread Dave Tilley
Howdy, I've been having trouble getting Connection Pooling working with either C3P0 or DBCP and using MySQL... the connection dies after some number of hours and the next time the webapp is used, it hangs, and an ioException is logged with a connection failure. I have been told there is some

Re: [Hibernate] Connection Pooling / Connection Validation - best practices?

2003-08-27 Thread Ludvig Omholt
On Wed, Aug 27, 2003 at 02:19:09AM -0400, Dave Tilley wrote: Howdy, I've been having trouble getting Connection Pooling working with either C3P0 or DBCP and using MySQL... the connection dies after some number of hours and the next time the webapp is used, it hangs, and an

Re: [Hibernate] Connection Pooling / Connection Validation - best practices?

2003-08-27 Thread Ludvig Omholt
FWIW: At our site we use this parameter in a Tomcat DBCP-resource with autocommit false if i recall correctly. We have not seen any losses of database connections. On Wed, Aug 27, 2003 at 07:37:46PM +1000, Gavin King wrote: Someone has claimed that this parameter doesn't work if autocommit is

Re: [Hibernate] Connection Pooling / Connection Validation - best practices?

2003-08-27 Thread Dave Tilley
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

Re: [Hibernate] Connection Pooling / Connection Validation - best practices?

2003-08-27 Thread Travis Reeder
The latest c3p0 has a new property, this is fromt he c3p0 developer a while back: I've added a new configuration property, idleConnectionTestPeriod, which if set to a number of seconds greater than zero, causes idle connections in the pool to be periodically checked, and discarded if they are