Fix uninstall tool + add upgrade task for removing configuration backend
The uninstall tool was complaining about the ConfigurationBackend being
registered twice within the DirectoryServer.
It happened because the ConfigurationBackend is now registered by
DirectoryServer.initializeConfiguration().
This commit changes that by splitting ConfigurationHandler creation and
ConfigurationBackend registration.
The ConfigurationBackend is not initialized by the BackendConfigManager
like any other backends.
This commit also adds an update task that removes the config entry for
the ConfigurationBackend in config.ldif.
This commit also removes the coupling of sub entry manager, group
manager and ACI sub system towards the configuration backend.
There is no longer any custom code for this and all is handled via the
BackendInitializationListener.
This commit also removes a lot of duplicated code in the
BackendConfigManager.
Finally, this commit also does some code cleanup to make things simpler
(or not).
DirectoryServer.java:
In initializeConfiguration(), do not create and register the
ConfigurationBackend. Moved this resposibility to the
BackendConfigManager.
BackendConfigManager.java:
In initializeBackendConfig(), now call initializeConfigurationBackend().
Big refactoring to reduce code duplkication:
- rename initializeBackend() to configureAndOpenBackend()
- extracted initializeBackend(), registerBackend(), deregisterBackend()
methods
- inilined onBackendPreInitialization(), onBackendPostInitialization()
methods
- reused releaseSharedLock()
ConfigFileHandlerBackendConfiguration.xml: REMOVED
It was already unused after the switch to the new config has removed the
entry for the configuration backend in config.ldif.
Upgrade.java, tool.properties:
Added a task to remove the config entry for the configuration backend