title: database connection pool purpose?
body: <p>Considering a simple thread pool. The main purpose of a thread pool is reusing(recycling) a thread in order to limit the maximum number of threads and preventing of remove and create threads, am I right?<br/>
  Recently I have read(wikipedia connection pool) that in Java EE, database connection are pooled by server, but I cannot figure out why?<br/>
  <strong>Questions:</strong><br/></p>
  
  <ul>
  <li>What is the main purpose of pooling sql connection in java? </li>
  <li>Is it okay to pool 128 connections and keep all of them open? </li>
  <li>What is the difference if 128 concurrent select commands get run by one connection or 128 connection? </li>
  <li>What is the correct way to connect to the database through a connection pool?</li>
  <li>How do both server and database handle the connections?</li>
  <li>How does server reuse a closed connection?</li>
  <li>Is pool still necessary when whole server components use a shared connection?</li>
  </ul>
  
  <p>Thanks in advance.</p>