Releases the connection. If the connection is locked or does not have a connection manager associated with it, this method has no effect. Note that it is completely safe to call this method multiple times.
Releases the connection being used by this HTTP method. In particular the connection is used to read the response (if there is one) and will be held until the response has been read. If the connection can be reused by other HTTP methods it is NOT closed at this point.
After this method is called, {@link #getResponseBodyAsStream} will returnnull, and {@link #getResponseBody} and {@link #getResponseBodyAsString}may return null.
Releases the connection being used by this HTTP method. In particular the connection is used to read the response(if there is one) and will be held until the response has been read. If the connection can be reused by other HTTP methods it is NOT closed at this point.
@since 2.0
Releases a connection for use by others. You may optionally specify how long the connection is valid to be reused. Values <= 0 are considered to be valid forever. If the connection is not marked as reusable, the connection will not be reused regardless of the valid duration. If the connection has been released before, the call will be ignored.
@param conn the connection to release
@param validDuration the duration of time this connection is valid for reuse
@param timeUnit the unit of time validDuration is measured in
@see #closeExpiredConnections()
Release connection - CAUTION: Release every connection after use to avoid abandoned connections. Depending on the used implementation connection will be closed, returned to pool, ...
This method returns a connection to the pool, and must be called by the requestor when finished with the connection.
@param connection The database connection to release.
@exception Exception Trouble releasing the connection.
Used to give back a connection to the pool. If the pool is already full it will throw an exception. If the success flag is true, it well release the connection back to the pool, otherwise it will throw away the current connection and add to the pool a new one.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.