title: Reasons why resources in c3p0 cannot get checked out?
body: <p>So I was looking into the c3p0 API to debug one of our production issues which was resulting in a stack overflow error while checking out a connection.</p>
  
  <p>I found below comments in <code>BasicResourcePool</code> class's <code>checkoutResource</code> method:</p>
  
  <pre><code>    /*
   * This function recursively calls itself... under nonpathological
   * situations, it shouldn't be a problem, but if resources can never
   * successfully check out for some reason, we might blow the stack...
   *
   * by the semantics of wait(), a timeout of zero means forever.
   */
  </code></pre>
  
  <p><strong>I want to know what might be the reasons the resources from this pool can never get successfully checked out.</strong></p>
  
  <p>The answer might help me look into what might be going possibly wrong in my application.</p>