I\'m developing with Java SE application using Hibernate 4 and c3p0 for communication with MariaDB database. It\'s long running application, waiting for signals from outside, so
Try setting testConnectionOnCheckout to true in your c3p0-config.