title: Do you need to close the connection you get from jdbc connection pool?
body: <p>Suppose I have the following code </p>
  
  <pre><code>DataSource source = (DataSource) (new InitialContext()).lookup("jdbc/myName"); 
  Connection connnection = source.getConnection() 
  
  //use the connection to do some database operations...
  </code></pre>
  
  <p>at the end, should I still call <br><br>
  <code>connection.close()</code> to release the resource?</p>
  
  <p>If the connection is from a connection pool, if I don't do anything, the connection should be automatically returned to the pool, right? </p>
  
  <p>On the other hand, if I close it, is there gonna be any adverse effect on the connection pool (ie, after several calls, there won't be any connection left in the pool?)</p>