Fix for issue 2618.
The problem is that the root server entry is not created by default (it is used by some parts of the code to know if the ADS was initialized or not). The fix consists of updating the ADSContext.registerServer method to check if the parent entry exists. The check is only applied here since this is a particular case (and by default this check is not required for other entries in the ADS).
| | |
| | | BasicAttributes attrs = makeAttrsFromServerProperties(serverProperties); |
| | | try |
| | | { |
| | | // This check is required because by default the server container entry |
| | | // does not exist. |
| | | if (!isExistingEntry(nameFromDN(getServerContainerDN()))) |
| | | { |
| | | createContainerEntry(getServerContainerDN()); |
| | | } |
| | | dirContext.createSubcontext(dn, attrs).close(); |
| | | if (serverProperties.containsKey( |
| | | ServerProperty.INSTANCE_PUBLIC_KEY_CERTIFICATE)) |