title: Whats the best way to set the values of C3P0 parameters when it is in conjunction with Hibernate?
body: <p><strong>First of all please note:</strong> question is about values of parameters not methods of configuration. Also, my question is customized to my system requirement. </p>
  
  <p>My system is going to be used by 20 concurrent users who make requests, and I believe max time that each query would be responded would be 300 seconds. Although I used JMeter and the application worked, I suspect the  value of idle_test_period should not be more than timeout value but in most tutorials online they are not. I am wondering if the following configuration is sufficient for my requirement. And whether the value of idle_test_period should be more than timeout or not?</p>
  
  <pre><code> &lt;property name="hibernate.c3p0.min_size"&gt;5&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_size"&gt;100&lt;/property&gt;
          &lt;property name="hibernate.c3p0.timeout"&gt;300&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_statements"&gt;50&lt;/property&gt;
          &lt;property name="hibernate.c3p0.idle_test_period"&gt;3000&lt;/property&gt;
          &lt;property name="current_session_context_class"&gt;thread&lt;/property&gt;
          &lt;property name="cache.provider_class"&gt;org.hibernate.cache.NoCacheProvider&lt;/property&gt;
  </code></pre>
  
  <p>Most websites configurations are the same such as : <a href="http://www.mkyong.com/hibernate/how-to-configure-the-c3p0-connection-pool-in-hibernate/" rel="nofollow">this</a> and <a href="http://www.roseindia.net/hibernate/hibernate4/HibernateC3P0.shtml" rel="nofollow">this</a></p>