title: getting a connection object from dataSource in groovy
body: <p>Our Application has a Datasource.groovy defined.
  I am using it in a controller like this </p>
  
  <pre><code>import  javax.sql.DataSource
  class xxx {
   javax.sql.DataSource dataSource
  
   def myappsql = new Sql(dataSource)
   myappsql.row(querystring) .....
  
  }
  </code></pre>
  
  <p>I need to get connection object from the datasource, is this possible directly like this :</p>
  
  <pre><code> Connection conn = myappsql.getConnection()
  </code></pre>
  
  <p>Since this is giving me error, does it have to be a <code>groovy.sql.Sql</code> to do this call?</p>
  
  <p>I am trying to avoid creating a connection object from scratch, with user, password and url string and instead reuse the one declared in datasource.</p>