I have an app that uses hibernate (v3.6.4) , with connection pooling provided by C3P0 (v0.9.1.2) .
The problem is I get a JDBC communications link failure if I make
We started having the same "Communications Link" issue when we upgraded hibernate to 4.3.x using JPA and C3P0 for connection pooling.
It seems like this would be a connection pool issue since connections were being kept longer than the database wait_timeout
(which was the default 8 hours) despite my C3P0 settings. However, I fixed the issue by changing the hibernate configuration in our persistence.xml
with:
It seems the default behavior in hibernate changed to not release the connection after transactions, so you have to explicitly set this mode if you're using pooling.