Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39B2F9F65 for ; Mon, 12 Mar 2012 10:17:04 +0000 (UTC) Received: (qmail 30099 invoked by uid 500); 12 Mar 2012 10:17:04 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 30053 invoked by uid 500); 12 Mar 2012 10:17:04 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 30042 invoked by uid 99); 12 Mar 2012 10:17:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 10:17:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pajbam@gmail.com designates 74.125.82.178 as permitted sender) Received: from [74.125.82.178] (HELO mail-we0-f178.google.com) (74.125.82.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 10:16:56 +0000 Received: by wera13 with SMTP id a13so4078178wer.37 for ; Mon, 12 Mar 2012 03:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=I33Uz6gs6GWBGw+6FIHyjpqQc+zs4oTqKSNWdm1AeUo=; b=miCFehj7I/eTpfR6RpZSpokzmlARc8neu+PMhfTAzU2s56hkCPsChrutvkmiSUNa/b tGBWusQf7n8++hmzGOO4TzafxyDD74a5X7mD8j6FgzJ/Y8cidJ0AH48wu6b9nBrGX7vg +SZCZzYXQFQgdNHTR/wj6UdtQV8v+mgEMGjgz/dqJAtvVaDf2iKtjIRoM9ijE6QByzLu gC+M6Ty4OQ3HfQ2u46X7tR7t6ORgH51GlfLm8dC2nfbpB5w6s3u9CRu/Eztpgm5XiTtQ Ybwvfi3JwDU2k1tL49lFB/DNlqzIVaeNZPHSN3T3K7YOV4gxcpzjizWfhqUFaj2VcXh5 4vgw== Received: by 10.180.82.136 with SMTP id i8mr25667210wiy.19.1331547396024; Mon, 12 Mar 2012 03:16:36 -0700 (PDT) Received: from [192.168.0.12] (lon92-10-78-226-4-211.fbx.proxad.net. [78.226.4.211]) by mx.google.com with ESMTPS id w14sm32705673wiv.11.2012.03.12.03.16.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Mar 2012 03:16:35 -0700 (PDT) Sender: Pierre-Arnaud Marcelot Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1257) Subject: Re: LdapConnectionFactory is most certainly useless From: Pierre-Arnaud Marcelot In-Reply-To: <4F5DC304.9000303@gmail.com> Date: Mon, 12 Mar 2012 11:16:34 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <5074F8A7-1907-4F5E-960A-5A20812E9354@marcelot.net> References: <4F5DC304.9000303@gmail.com> To: "Apache Directory Developers List" , elecharny@apache.org X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org Hi Emmanuel, I wasn't even aware of this class actually. I'm not sure it's that useful. +1. Regards, Pierre-Arnaud On 12 mars 2012, at 10:33, Emmanuel L=E9charny wrote: > Hi guys, >=20 > I think that the LdapConnectionFactory class is not only useless, but = it's also a source of problem. >=20 > Methods such as : > /** > * Gets the core session connection. > * > * @return a connection based on the the CoreSession > */ > public static LdapConnection getCoreSessionConnection() > { > try > { > Class cl =3D Class.forName( = "org.apache.directory.server.core.api.LdapCoreSessionConnection" ); > return ( LdapConnection ) cl.newInstance(); > } > catch ( Exception e ) > { > throw new RuntimeException( e ); > } > } >=20 > Are too dependent on the class name, and should not be used. If we = change its name, we could be in trouble. >=20 > I suggest we get rid of this class and use the constructors instead. >=20 > --=20 > Regards, > Cordialement, > Emmanuel L=E9charny > www.iktek.com >=20