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

neil_a_wilson
14.51.2007 873c5e7a10dc487f9f70719717eed7fd42e3bb13
Revert a change (committed in revision 3066) that added support for changing
the plugin type values on the fly and update the configuration definition to
indicate that this is not supported and to note that changes to the defined
plugin types will only take effect if the plugin is disabled and re-enabled or
the server is restarted.
2 files modified
26 ■■■■ changed files
opends/src/admin/defn/org/opends/server/admin/std/PluginConfiguration.xml 6 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/PluginConfigManager.java 20 ●●●●● patch | view | raw | blame | history
opends/src/admin/defn/org/opends/server/admin/std/PluginConfiguration.xml
@@ -91,8 +91,12 @@
  <adm:property name="plugin-type" mandatory="true" multi-valued="true">
    <adm:synopsis>
      The plugin types, which define the conditions under which this plugin
      should be invoked.
      should be invoked.  The plugin must be disabled and re-enabled for plugin
      type changes to take effect.
    </adm:synopsis>
    <adm:requires-admin-action>
      <adm:component-restart />
    </adm:requires-admin-action>
    <adm:syntax>
      <adm:enumeration>
        <adm:value name="startup">
opends/src/server/org/opends/server/core/PluginConfigManager.java
@@ -5411,7 +5411,7 @@
    // Get the existing plugin if it's already enabled.
    DirectoryServerPlugin<? extends PluginCfg> existingPlugin =
    DirectoryServerPlugin existingPlugin =
         registeredPlugins.get(configuration.dn());
@@ -5441,19 +5441,9 @@
      {
        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);
    }
@@ -5473,7 +5463,11 @@
    }
    catch (InitializationException ie)
    {
      resultCode = DirectoryServer.getServerErrorResultCode();
      if (resultCode == ResultCode.SUCCESS)
      {
        resultCode = DirectoryServer.getServerErrorResultCode();
      }
      messages.add(ie.getMessageObject());
    }