From dev-return-12057-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Mon May 29 16:20:48 2006 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 85597 invoked from network); 29 May 2006 16:20:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 May 2006 16:20:48 -0000 Received: (qmail 77624 invoked by uid 500); 29 May 2006 16:20:48 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 77403 invoked by uid 500); 29 May 2006 16:20:47 -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 77392 invoked by uid 99); 29 May 2006 16:20:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2006 09:20:47 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of aok123@bellsouth.net designates 205.152.59.67 as permitted sender) Received: from [205.152.59.67] (HELO imf19aec.mail.bellsouth.net) (205.152.59.67) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2006 09:20:46 -0700 Received: from ibm60aec.bellsouth.net ([65.80.200.112]) by imf19aec.mail.bellsouth.net with ESMTP id <20060529162023.BFFT9055.imf19aec.mail.bellsouth.net@ibm60aec.bellsouth.net> for ; Mon, 29 May 2006 12:20:23 -0400 Received: from [172.16.1.7] (really [65.80.200.112]) by ibm60aec.bellsouth.net with ESMTP id <20060529162024.LEVZ29925.ibm60aec.bellsouth.net@[172.16.1.7]> for ; Mon, 29 May 2006 12:20:24 -0400 Message-ID: <447B1F47.5020105@bellsouth.net> Date: Mon, 29 May 2006 12:20:23 -0400 From: Alex Karasulu User-Agent: Thunderbird 1.5.0.2 (X11/20060501) MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: Detecting LDAP Port busy at start-up References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Norbet Reilly wrote: > I'm not sure whether to direct this question to the ApachedDS dev > list, or the MINA one... > > I use an ApacheDS deployment with a custom partition that replaces an > existing directory installation. I want to detect the situation where > the other directory is already listening on the configured port, at > the time A-DS is started, and abort or at least log a very prominent > message. > > With my current limited understanding I am leaning toward adding a > configuration setting to > org.apache.directory.server.configuration.MutableServerStartupConfiguration > > (say "abortIfLdapPortInUse=true") and using it in > org.apache.directory.server.jndi.ServerContextFactory.startLDAP0() to > drive an optional check for "already in use" using > ServerSocket.bind(). > > Similar semantics may make sense for the other protocols that A-DS > supports, in which case it may be a case of a single > "abortIfAnyPortInUse" config item, or perhaps one per protocol. > > Anyone have any thoughts or alternative implementation suggestions ? I'm thinking about this Norbet but please excuse me for being late ... I'm on vacation and will get back to you. Thanks, Alex