I am using a connection pool and the Spring TransactionTemplate
. If you want to shutdown the connection pool first all connection have to be returned to the pool, this means connection.close()
has to be called. I have one thread using the TransactionTemplate
for some queries and another thread that wants to call some shutdown method on the connection pool, but before doing this it first has to tell the TransactionTemplate
to close all connection (actually only returning them to the pool).
How can this be done in Spring to immediately call close on the used connection?