In the Hibernate.cfg.xml configuration file, add the following:
<property name="Hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="hibernate.c3p0.max_size"> -</property> <!--The maximum number of database connections available in a connection pool-<property name="hibernate.c3p0.min_size">5</property> <!--The minimum number of database connections available in the connection pool-<property name="hibernate.c3p0.max_statements"> -</property> <property name="Hibernate.c3p0.idle_test_period"> -</property> <property name="hibernate.c3p0.acquire_increment">1</property> <property name="C3p0.testconnectiononcheckout">true</property> <property name="C3p0.idleconnectiontestperiod">18000</property> <property name="C3p0.maxidletime">25000</property>
Hibernate cannot get updates to the MySQL database in real time