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

dugan
14.57.2007 e72bf7841aacbc57df9958d1ad4778a04d7dab2d
Fix problem were a plugin's plugin types were not being re-registered after changing them with dsconfig.
1 files modified
20 ■■■■■ changed files
opends/src/server/org/opends/server/core/PluginConfigManager.java 20 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/PluginConfigManager.java
@@ -5411,7 +5411,7 @@
    // Get the existing plugin if it's already enabled.
    DirectoryServerPlugin existingPlugin =
    DirectoryServerPlugin<? extends PluginCfg> existingPlugin =
         registeredPlugins.get(configuration.dn());
@@ -5441,9 +5441,19 @@
      {
        adminActionRequired = true;
      }
      //The plugin-types might have been changed. Replace the plugin's
      //plugin-types with the configuration's plugin-types and re-register the
      //plugin with new types.
      Set<PluginType> currPluginTypes = existingPlugin.getPluginTypes();
      currPluginTypes.clear();
      for (PluginCfgDefn.PluginType pluginType :
           configuration.getPluginType())
      {
        currPluginTypes.add(getPluginType(pluginType));
      }
      existingPlugin.setInvokeForInternalOperations(
                          configuration.isInvokeForInternalOperations());
      registerPlugin(existingPlugin, configuration.dn(), currPluginTypes);
      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }
@@ -5463,11 +5473,7 @@
    }
    catch (InitializationException ie)
    {
      if (resultCode == ResultCode.SUCCESS)
      {
        resultCode = DirectoryServer.getServerErrorResultCode();
      }
      resultCode = DirectoryServer.getServerErrorResultCode();
      messages.add(ie.getMessageObject());
    }