title: Is unwrapped connection reused?
body: <p>I have a spring component like following:</p>
  
  <pre><code>@Component
  class FooComponent {
  
      @Autowired
      private DataSource dataSource;
  
      public void execute() {
          try (SQLServerConnection connection = dataSource.getConnection().unwrap(SQLServerConnection.class)) {
          // some logic here with connection
          }
      }   
  }
  </code></pre>
  
  <p>I have to unwrap the connection because I'm using some API from Microsoft's JDBC driver (it throws exeption if I'm just passing <code>dataSource.getConnection()</code>).</p>
  
  <p>So my question is:
  I'm correctly getting the connection in <code>execute</code> method? Can that piece of code cause "connection leaks"?</p>
  
  <p>I'm asking this because at some point I saw in logs a error like: <code>Could not get JDBC Connection; nested exception is org.apache.tomcat.jdbc.pool.PoolExhaustedException</code>. (I'm not asking how to solve this error or what it means)</p>