directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lee Feigenbaum (JIRA)" <>
Subject [jira] Created: (DIRSERVER-1151) Cannot have multiple instance in-process listening on different sockets / ports
Date Sat, 15 Mar 2008 19:52:24 GMT
Cannot have multiple instance in-process listening on different sockets / ports

                 Key: DIRSERVER-1151
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: ldap
         Environment: Windows, JRE 1.5*
            Reporter: Lee Feigenbaum is a closed issue regarding allowing multiple
directory service instances to co-exist in a single process. It was solved by multiplexing
directory service instances based on the configuration instance (as given by the Configuration.JNDI_KEY
in the environment) which in turn returns the proper instance via .getInstanceId().

However, there appears to be no way to create two instances based on ServerStartupConfiguration's
and multiplex from the socket (port) on which each listens to down to the proper environment
(and therefore to the proper directory service). Instead, whichever directory service is created
last "wins", and all LDAP requests that come in over TCP/IP end up going to that instance,
regardless of which port they arrive on.

I was going to try to patch this myself, but I'm not sure where the proper state is that would
be the right point to multiplex from socket -> environment. Right now, the environment
is tied to a (singleton) SessionRegistry, which is wiped out (via SessionRegistry.releaseSingleton())
when a new LdapProtocolProvider is instantiated. If SessionRegistry were changed to map from
??? to different instances, there would still need to be multiplexing code for handling messages
that passes them onto the proper SessionRegistry. Right now, messages seem to only be multiplexed
based on type.

Anyway, sorry this is a bit disjointed; I only started digging into the Apache DS code yesterday
to figure out why my two instances on different ports were trampling on each other. I hope
this is helpful and resolvable :)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message