Directory Server allows you to define the order in which plug-ins are called. This mechanism is independent of the mechanism that defines plug-in load dependencies.
This mechanism uses a set of attributes on the entry with DN cn=plugins,cn=monitor. Plug-in call ordering is defined for each type of plug-in on attributes whose values are comma-separated lists of plug-in names. Each attribute type name starts with plugin-list- and identifies a point in the server request processing where plug-ins can be called. In the comma-separated list of plug-ins, the first plug-in in the list is called first, the second is called second, and so forth.
For example, six postoperation plug-ins are called after a modify operation. The plugin-list-postoperation-modify attribute on cn=plugins,cn=monitor shows the order in which these six plug-ins are called by the server.
plugin-list-postoperation-modify: Class of Service, Legacy replication postoperation plugin, Multimaster replication postoperation plugin, Retrocl postoperation plugin, Roles Plugin, State Change Plugin
You can also retrieve these attributes by performing a search on the entry with DN cn=plugins,cn=monitor.
To change the order in which plug-ins are called, you must not modify the value of the attribute type starting with plugin-list-. Instead, you must modify the value of a corresponding attribute type starting with plugin-order-, and having the same ending as the plugin-list- attribute.
The full list of plug-in call ordering attribute types is as follows:
plugin-order-bepostoperation-add
plugin-order-bepostoperation-delete
plugin-order-bepostoperation-modify
plugin-order-bepostoperation-modrdn
plugin-order-beprecommit-add
plugin-order-beprecommit-delete
plugin-order-beprecommit-modify
plugin-order-beprecommit-modrdn
plugin-order-bepreoperation-add
plugin-order-bepreoperation-delete
plugin-order-bepreoperation-modify
plugin-order-bepreoperation-modrdn
plugin-order-internalpostoperation-add
plugin-order-internalpostoperation-delete
plugin-order-internalpostoperation-modify
plugin-order-internalpostoperation-modrdn
plugin-order-internalpreoperation-add
plugin-order-internalpreoperation-delete
plugin-order-internalpreoperation-modify
plugin-order-internalpreoperation-modrdn
plugin-order-postoperation-abandon
plugin-order-postoperation-add
plugin-order-postoperation-bind
plugin-order-postoperation-compare
plugin-order-postoperation-delete
plugin-order-postoperation-entry
plugin-order-postoperation-modify
plugin-order-postoperation-modrdn
plugin-order-postoperation-referral
plugin-order-postoperation-result
plugin-order-postoperation-search
plugin-order-postoperation-unbind
plugin-order-preoperation-abandon
plugin-order-preoperation-add
plugin-order-preoperation-attr-encode-result
plugin-order-preoperation-bind
plugin-order-preoperation-compare
plugin-order-preoperation-delete
plugin-order-preoperation-entry
plugin-order-preoperation-finish-entry-encode-result
plugin-order-preoperation-modify
plugin-order-preoperation-modrdn
plugin-order-preoperation-referral
plugin-order-preoperation-result
plugin-order-preoperation-search
plugin-order-preoperation-unbind
plugin-order-pwdpolicy-bind-fail
plugin-order-pwdpolicy-bind-success
For example, if you want to change the order in which postoperation plug-ins are called after a modify, first read plugin-list-postoperation-modify. Next set plugin-order-postoperation-modify, copying plug-in names from the value of plugin-list-postoperation-modify. Then restart Directory Server. Plug-in names are not case—sensitive, but white spaces are taken into account. Unrecognized names are ignored.
With a single asterisk, *, as an item in the comma-separated list, you let Directory Server define the call order for plug-ins you do not identify explicitly.
If you have two postoperation modify plug-ins, the first, Call Me First, and the second, Call Me Last, you could set plugin-list-postoperation-modify as follows:
plugin-order-postoperation-modify: Call Me First,*,Call Me Last
The plug-in name that you specify must be identical to the name argument that is passed to the slapi_register_plugin function. There must also be no white space between the comma delimiter and the adjacent plug-in names, and no white space at the end of the names list.
Plug-ins can remain that you do not explicitly identify by name or implicitly identify using *. Directory Server calls such plug-ins before calling the plug-ins that you listed.