mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
17.14.2012 12145b7bfa2ca15dd48a82aec6d8ebd0223f2afc
Additional improvement for OPENDJ-590: ConnectionPool may return already closed/disconnected connections

Add Javadoc to Connections.newFixedConnectionPool specifying how stale connections are handled, and how applications should deal with them.

1 files modified
9 ■■■■■ changed files
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Connections.java 9 ●●●●● patch | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Connections.java
@@ -72,6 +72,15 @@
    /**
     * Creates a new connection pool which will maintain {@code poolSize}
     * connections created using the provided connection factory.
     * <p>
     * Connections obtained from the connection pool are guaranteed to be valid
     * immediately before being returned to the calling application. More
     * specifically, connections which have remained idle in the connection pool
     * for a long time and which have been remotely closed due to a time out
     * will never be returned. However, once a pooled connection has been
     * obtained it is the responsibility of the calling application to handle
     * subsequent connection failures, these being signaled via a
     * {@link ConnectionException}.
     *
     * @param factory
     *            The connection factory to use for creating new connections.