title: C3P0 Configurations! Where and How?
body: <p>We are implementing a Web App using JPA2.0 and Hibernate3.0. Connection pool configurations are set in persistence.xml located in META-INF folder.</p>
  
  <hr>
  
  <p>persistence.xml:</p>
  
  <pre><code>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0"&gt;
      &lt;persistence-unit name="MyPU" transaction-type="RESOURCE_LOCAL"&gt;
          &lt;!-- Entity Classes--&gt;
          &lt;properties&gt;
              &lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/&gt;
              &lt;property name="hibernate.show_sql" value="true"/&gt;
              &lt;property name="bytecode.provider"   value="org.hibernate.bytecode.javassist.BytecodeProviderImpl"/&gt;
              &lt;property name="hibernate.connection.username" value="{username}"/&gt;
              &lt;property name="hibernate.connection.password" value="{password}"/&gt;
              &lt;property name="hibernate.hbm2ddl.auto" value="update"/&gt;
              &lt;property name="hibernate.format_sql" value="true"/&gt;
              &lt;property name="hibernate.connection.url" value="{jdbc url}"/&gt;
  
              &lt;property name="hibernate.c3p0.min_size" value="1"/&gt;
              &lt;property name="hibernate.c3p0.timeout" value="1000"/&gt;
              &lt;property name="hibernate.c3p0.acquire_increment" value="1"/&gt;
              &lt;property name="hibernate.c3p0.idle_test_periods" value="600"/&gt;
              &lt;property name="hibernate.c3p0.testConnectionOnCheckin" value="true"/&gt;
              &lt;property name="hibernate.c3p0.preferredTestQuery" value="SELECT 1;"/&gt;
         &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <hr>
  
  <p>We have a problem with connection pool configurations. It seems the configurations have no effect and the connection will be broken after 8 hours.
  Do we need another configuration file like hibernate.cfg.xml or hibernate.properties?</p>