title: Spring-boot + JDBC + HSQLDB: How to Verify if Spring Boot is using a Connection Pool?
body: <p>According to <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html" rel="nofollow">this documentation</a>:</p>
  
  <blockquote>
    <p><strong>29.1.1 Embedded Database Support</strong></p>
    
    <p>Spring Boot can auto-configure embedded H2, HSQL and Derby databases.
    You don’t need to provide any connection URLs, simply include a build
    dependency to the embedded database that you want to use.</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p><strong>29.1.2 Connection to a production database</strong></p>
    
    <p>Production database connections can also be auto-configured using a pooling
    DataSource.</p>
    
    <p>DataSource configuration is controlled by external configuration
    properties in spring.datasource.*. For example, you might declare the
    following section in application.properties:</p>
  </blockquote>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost/test
  spring.datasource.username=dbuser
  spring.datasource.password=dbpass
  spring.datasource.driver-class-name=com.mysql.jdbc.Driver 
  </code></pre>
  
  <blockquote>
    <p>[Tip] You
    often won’t need to specify the driver-class-name since Spring boot
    can deduce it for most databases from the url. </p>
    
    <p>[Note] For a pooling
    DataSource to be created we need to be able to verify that a valid
    Driver class is available, so we check for that before doing anything.
    I.e. if you set
    <strong>spring.datasource.driver-class-name=com.mysql.jdbc.Driver</strong> then that
    class has to be loadable.</p>
  </blockquote>
  
  <p><br>
  What if I placed the following in my <strong>application.properties</strong> file:</p>
  
  <pre><code>spring.datasource.url=jdbc:hsqldb:file:db/organization-db
  spring.datasource.username=dbuser
  spring.datasource.password=dbpass
  spring.datasource.driver-class-name=org.hsqldb.jdbc.JDBCDriver
  </code></pre>
  
  <p>Will Spring Boot auto-configure a pooling Datasource, since I specified the <strong>spring.datasource.driver-class-name</strong>?
   <br>
  Or will it just create a Datasource for the embedded Database driver without connection pooling? 
  <br>
  How do I confirm if Spring Boot is using connection pooling?</p>