Hi, Directory developers, 1) Has anyone given any thought to where we would put the initialization code for administrative triggers and stored procedure's?
For review, in the ITest there are 2 key lines: a) Where the stored procedure is loaded: // Load the stored procedure unit which has the stored procedure to be triggered. JavaStoredProcedureUtils.loadStoredProcedureClass( ctx, BackupUtilities.class ); b) Where the trigger is added: // Create the Trigger Specification within a Trigger Subentry. createTriggerSubentry( ctx, "triggerSubentry1", "AFTER Delete CALL \"" + BackupUtilities.class.getName() + ".backupDeleted\" ( $ldapContext \"\", $name, $operationPrincipal, $deletedEntry )" ); The use case here is that I would like to automatically derive Kerberos keys for users when they modify userPassword. So, I have an SP that I need to load into the DIT and I have a trigger that I need to set on the ou=users subtree. Short term this could be added to ServerContextFactory, after the backend is started and any LDIF's loaded. We could potentially have a lot of them for various server/admin tasks. 2) Also, what would the process look like for checking if the SP and trigger already exist? Would we just load/set them again since it's not harmful, like we do with loading LDIF's at startup? 3) What are the pros/cons with doing this with a trigger/SP vs. an Interceptor? The major thing is the "scope," right? Meaning a trigger/SP can apply to subtree/subtree refinements (TEDs), while an interceptor wouldn't have those semantics by default. Any other pros/cons? Enrique
