mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
06.09.2016 10f0e9c1ad2e1296678c3706152a84437da35a78
refs
author Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, April 6, 2016 11:09 +0200
committer Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, April 6, 2016 18:25 +0200
commit10f0e9c1ad2e1296678c3706152a84437da35a78
tree 139ec60e839f27fa8ddfd6475a271ba223e0db84 tree | zip | gz
parent 363bbdde86302624110aa2d864b2cc3a7c2a9bf6 view | diff
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
1 files deleted
7 files modified
773 ■■■■■ changed files
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/ConfigFileHandlerBackendConfiguration.xml 52 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciHandler.java 143 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciListenerManager.java 120 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/BackendConfigManager.java 342 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/ConfigurationBackend.java 89 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java 21 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/Upgrade.java 4 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/messages/org/opends/messages/tool.properties 2 ●●●●● diff | view | raw | blame | history