How To Close a Physical Connection in a Connection Pool ?

(Doc ID 452915.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


A JDBC  application uses a connection pool.  Occasionally a connection might be altered in such a way that it should not be placed back on the pool for general use.

For example a connection has opened DB links that might become stale by the time the connection is re-used.

The default call for closing the connection is:  connection.close()

Since the connection is pooled,  this merely places the connection back in the pool for re-use, which in this case is not suitable.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms