Return-Path: X-Original-To: apmail-directory-api-archive@minotaur.apache.org Delivered-To: apmail-directory-api-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 983D4DC81 for ; Thu, 15 Nov 2012 20:57:52 +0000 (UTC) Received: (qmail 87259 invoked by uid 500); 15 Nov 2012 20:57:52 -0000 Delivered-To: apmail-directory-api-archive@directory.apache.org Received: (qmail 87197 invoked by uid 500); 15 Nov 2012 20:57:51 -0000 Mailing-List: contact api-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: api@directory.apache.org Delivered-To: mailing list api@directory.apache.org Received: (qmail 87176 invoked by uid 99); 15 Nov 2012 20:57:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 20:57:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of damien.dube@gmail.com designates 209.85.210.178 as permitted sender) Received: from [209.85.210.178] (HELO mail-ia0-f178.google.com) (209.85.210.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 20:57:44 +0000 Received: by mail-ia0-f178.google.com with SMTP id y26so1502446iab.37 for ; Thu, 15 Nov 2012 12:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=SLsrAUcRbsPBb0mMerGJoiWPTknKJYZUuxdKHAMDnxc=; b=qtHgPXeFqTRRaVlEzGM8I7cjTCpvMCuSZkvqpInB+aFEaA4ACFcVSd5G4FUVHcBXgZ sIfLLiVY4rZnOFvETrrPF0afWJNZuLrshdS8Ny6z0oTEW52LXE2oX2SYSVuxNB4FwWKB 5wOol1c0ZLekN9rWvT5Lt/dmt+o77RGga09esHyHGfv7oSLS2CuiwysuZZ/GUceLgJ2U dhjbsrdFp/1oMIq4Vttlo81TkameSeAYU3lvTI6weD0okdpJxZ/zuvkRzEjEOS3TBBx9 Kn+5XJ9EriQwNNbpkbTEtSseDaD1sZ4JdymmHzEpPTfm3SQ7anVnj3YiNtBk7xWaJFBT lJIg== Received: by 10.42.175.5 with SMTP id ay5mr1927164icb.10.1353013044201; Thu, 15 Nov 2012 12:57:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.73.42 with HTTP; Thu, 15 Nov 2012 12:57:04 -0800 (PST) From: =?UTF-8?B?RGFtaWVuIER1YsOp?= Date: Thu, 15 Nov 2012 15:57:04 -0500 Message-ID: Subject: bug in LdapConnectionPool. To: api Content-Type: multipart/alternative; boundary=90e6ba6e8f38e047f304ce8ee579 X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba6e8f38e047f304ce8ee579 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I found a bug in LdapConnectionPool. If a Connection fails on credentials, the LdapConnection is not closed and is not in the pool. I modified the makeObject() function in PoolableLdapConnectionFactory.java to this public Object makeObject() throws Exception { LOG.debug("creating a LDAP connection"); LdapNetworkConnection connection =3D new LdapNetworkConnection(config); try { connection.bind(config.getName(), config.getCredentials()); } catch (Exception e1) { try { connection.close(); } catch (Exception e2) { } throw e1; } return connection; } It seems to be doing the trick! Damien Dub=C3=A9 damien.dube@gmail.com --90e6ba6e8f38e047f304ce8ee579--