title: c3p0 not being effective
body: <p>My <a href="http://www.mchange.com/projects/c3p0/" rel="nofollow noreferrer">c3p0</a> is not honoring the sessions optimization of my application. The active sessions reaches the threshold (set as 800) and eventually the application has to be restarted. This should not happen when I have c3p0 set up in place.
  My current set is as follows:</p>
  
  <pre><code>&lt;!-- JDBC connection pool settings --&gt;
          &lt;property name="connection.provider_class"&gt;org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider&lt;/property&gt;
          &lt;property name="c3p0.max_size"&gt;100&lt;/property&gt;
          &lt;property name="c3p0.min_size"&gt;5&lt;/property&gt;
  
          &lt;!-- The seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire --&gt;
          &lt;property name="c3p0.timeout"&gt;300&lt;/property&gt;
  
          &lt;!-- for Oracle set 'max_statements' to 0 set to 100 otherwise 
          &lt;property name="c3p0.max_statements"&gt;0&lt;/property&gt;
  
          &lt;!-- If this is a number greater than 0, c3p0 will test all idle, pooled but unchecked-out connections, every this number of seconds --&gt;
          &lt;property name="c3p0.idle_test_period"&gt;120&lt;/property&gt;
  
          &lt;!-- Determines how many connections at a time c3p0 will try to acquire when the pool is exhausted --&gt;
          &lt;property name="c3p0.acquire_increment"&gt;1&lt;/property&gt;
  
          &lt;property name="hibernate.jdbc.batch_size"&gt;100&lt;/property&gt;
  </code></pre>
  
  <p>Jars used:</p>
  
  <ul>
  <li><code>hibernate-c3p0-4.2.1.Final.jar</code></li>
  <li><code>c3p0-0.9.5.2.jar</code></li>
  <li><code>mchange-commons-java-0.2.11</code></li>
  </ul>
  
  <p>Database: Oracle</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>How will my c3p0 setup be effective?</li>
  <li>Is there some additional parameter required for optimization? shall
  I use some more properties in the production environment?</li>
  </ol>