An extended Hibernate connection pool called c3p0 can be configured. Just specify the configuration parameter in the persistence.xml file:
<property name="hibernate.c3p0.testConnectionOnCheckout" value="true"/>
Hibernate will then try to access the required classes. With Maven you configure:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.1.8.Final</version>
</dependency>
. , , . , . SQL, 10% .