starrin,
re your c3p0 configuration, there are some problems. But one of them is my fault -- there is something missing from c3p0's docs!
as you noticed, there are several parameters that MUST be set in your hibernate config. in hibernate 2.1, one of these is...
Code:
hibernate name c3p0 native param
------------------ ---------------------
hibernate.c3p0.validate testConnectionOnCheckout
...so you need to set this in your hibernate config rather than in c3p0.properties!
(hibernate3 seems to have removed "hibernate.c3p0.validate" from the hibernate-managed params... that's why it's not mentioned in c3p0 docs.)
also, in your c3p0.properties, you have...
c3p0.idelConnectionTestPeriod
this property name is misspelled (it should be c3p0.idleConnectionTestPeriod), but it also needs to be set in hibernate, as...
Code:
hibernate name
------------------
hibernate.c3p0.idle_test_period
when you have c3p0-related problems, a good thing to do is check the config dump c3p0 spits into your logs on pool initialization, and make sure that the configuration that you think you are setting is actually getting through to the pool.
although it sounds like you had other issues as well, proper configuration of Connection testing should help with database failover issues.
smiles,
Steve (c3p0 guy)