Manage connections
The following table contrasts different implementations
of the connection.close() and scrubConnection() methods
when they are in connection pool setup or not.
Connection pooling status | Behavior with connection.close() method | Behavior with scrubconnection() method |
---|---|---|
Non-connection pool setup | Closes database connection, all associated statement objects, and their result sets Connection is no longer valid. | Returns connection to default state, keeps opened statements, but closes result sets Connection is still valid. Releases resources associated with result sets only. |
Connection Pool with HCL OneDB™ Implementation | Closes connection to the database and reopens it to close any statements associated with the connection object and reset the connection to its original state Connection object is then returned to the connection pool and is available when requested by a new application connection. | Returns a connection to the default state and keeps all open statements, but closes all result sets. Calling this method is not recommended here. |
Connection Pool with AppServer Implementation | Defined by users connection pooling implementation | Returns connection to default state and retains opened statements, but closes result sets |