Reputation: 2801
When I do a dataSource.getConnection(), when I want the connection to be return to the pool (and not closed), does calling the close method return the connection to the pool or actually close it?
Upvotes: 9
Views: 6853
Reputation: 80166
When you call the close() on connection returned by a DataSource, it would return that to the pool to be used by other thread. Closing the connection defeats the purpose of the pool.
Upvotes: 10