title: Programmatically configure Hibernate with dynamic username and password
body: <p>I am implementing a web application where the user needs to authenticate with his database username and password.
  I woudld like to use the same entered username and password to connect to the database.</p>
  
  <p>In other words, i would like that these two fields:(dbusername and dbpassword) in the hibernate configuration file:</p>
  
  <pre><code>&lt;property name="hibernate.connection.username"&gt;dbusername&lt;/property&gt;
  &lt;property name="hibernate.connection.password"&gt;dbpassword&lt;/property&gt;
  </code></pre>
  
  <p>can be filled dynimacally dependant on the user who enterd his username and password to log in the web application.</p>
  
  <p>is this do-able?</p>
  
  <p>thanks</p>