From 1509e9ddbfc5b7112c0a1553cf539b4d7164afd1 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 17 Sep 2012 11:14:22 +0000
Subject: [PATCH] Additional improvement for OPENDJ-590: ConnectionPool may return already closed/disconnected connections

---
 opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Connections.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Connections.java b/opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Connections.java
index c892cbb..6ab7125 100644
--- a/opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Connections.java
+++ b/opendj-sdk/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.

--
Gitblit v1.10.0