title: Each request from user call a new getConnection()?
body: <p>The database connection is get like below  </p>
  
  <pre><code>public Connection getDBConection(){  
     Context context = new InitialContext();  
     DataSource dataSource = (javax.sql.DataSource) context.lookup("java:myDataSource");  
     Connection conn = dataSource.getConnection();  
  }  
  </code></pre>
  
  <p>For a userA, is each database request should call <code>getDBConnection()</code> once; but no need to control all request use the same connection?  </p>
  
  <p>That is, if userA has three database request, then userA should call <code>getDBConnection()</code> three times, and call <code>Connection.closed()</code> after used in each request?  </p>
  
  <p>If the userA call <code>getDBConnection()</code> three times (that is, call <code>dataSource.getConnection()</code> three times), is three connection created? Or it is unknown and controlled by weblogic?  </p>
  
  <p>I feel very chaos, is it true that there should be one new connection for one database request? or just call <code>DataSource.getConnection()</code> for each database request and the number of new connection created is controlled by web server, no need to think how many connection is actually created.</p>