In the scenario where a connection is got from a database pool(like Commons DBCP, etc) and when the connection is closed using connection.close(), how is the connection returned to the pool?
Is there come callback method in connection object which is called on connection.close() which returns the connection back to the pool from which it originated?
Usually the connection object you receive is a decorator of the original one and calling
closesimply returns it to the pool. It does not close it.