Cannot have multiple instance in-process listening on different sockets / ports
-------------------------------------------------------------------------------

                 Key: DIRSERVER-1151
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1151
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: ldap
         Environment: Windows, JRE 1.5*
            Reporter: Lee Feigenbaum


http://issues.apache.org/jira/browse/DIRSERVER-485 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.

Reply via email to