directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: Detecting LDAP Port busy at start-up (Repost)
Date Tue, 06 Jun 2006 13:53:44 GMT
Norbet Reilly wrote:

> here's the repost...
> ====================
>
> 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.

Hmm this is pretty hard to do right now.  The best way to test this is
to try to bind to the port with a little connection test.

BTW I'm presuming that the two installations are running in separate
JVMs.  Am I correct here or did I miss something?

Alex

>
> 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().
>
Sounds like you want to test if the server has bound in the same JVM
instance.  Is this the case?

> 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" csonfig item, or perhaps one per protocol.

Yeah it might for sure.   I do want to understand your use case a bit
better.   Could you elaborate some more with greater detail?

Thanks,
Alex


Mime
View raw message