With new DataSource(PoolProperties)
you do not create a "DataSource object wrapping a connection" (as stated in the ApiDocs). Instead, you create a pool of connections (also mentioned in the ApiDocs, but at the top: "The DataSource simply wraps a ConnectionPool ..."). I verified this in, what I think is, the source code (see line 108 of DataSourceProxy).
Consequently, closing a Connection only returns it to the pool (so it can be re-used), it does not actually close the connection (unless you see the connection actually being closed on the database server, in which case I'm wrong). Solution is to create 1 DataSource object and re-use it for each getConnection()
call. Close the DataSource/ConnectionPool when the application no longer needs a database connection.