title: How to get current Connection object used by jdbcTemplate
body: <p>I am looking for a way to intercept the connection that JDBCTemplate creates internally i.e. the connection that is created when the function <code>getConnection()</code> is called by JDBCTemplate.  </p>
  
  <p>ex: if I use <code>jdbcTemplate.update(query);</code> I want to get the information of the connection that was used to complete this update statement. Is there a way to see the metadata of the connection mid or post execution of this statement ? I am using C3P0 connection pool.</p>
  
  <p>Many people have suggested using <code>DataSourceUtils.getConnection()</code> , but that just fetches a new connection from the pool and does not solve my issue.</p>
  
  <p>This thread also effectively asks the same question: <a href="https://stackoverflow.com/questions/8428235/how-to-get-current-connection-object-in-spring-jdbc">How to get current Connection object in Spring JDBC</a></p>