title: Why do we need to provide password in datasource?
body: <p>I just want to understand how the database connection work through datasource.</p>
  
  <p>When we set up data source, we need to provide username/password.  However, if you want to retrieve a connection through datasource, we still supply another user name/password.  </p>
  
  <pre><code>datasource.getConnection(username,password)
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>datasource.getConnection();
  </code></pre>
  
  <p>Why do we do that?  is that redundancy?  </p>
  
  <p>I hope someone can help me to clarify that.</p>