PreviousNext

The context Parameter

The context defines the characteristics of the directory interaction that are specific to a particular directory operation; nevertheless, the same characteristics are often used for many operations. Since these parameters are presumed to be relatively static for a given directory user during a particular directory interaction, these parameters are collected into an OM object of OM class DS_C_CONTEXT, which is supplied as the second parameter of each directory service request. This reduces the number of parameters passed to each function.

The context includes many administrative details, such as the CommonArguments defined in the abstract service, which affect the processing of each directory operation. These include a number of ServiceControls, which allow control over some aspects of the service. The ServiceControls include options such as preferChaining, chainingProhibited, localScope, dontUseCopy, and dontDereferenceAliases, together with priority, timeLimit, sizeLimit, and scopeOfReferral. Each of these is mapped onto an OM attribute in the context (see XDS Class Definitions).

The effect of passing the context parameter is as if its contents were passed as a group of additional parameters for every function call. The value of each component of the context is determined when the interface function is called, and it remains fixed throughout the operation.

All OM attributes in the class DS_C_CONTEXT have default values, some of which are administered locally. The constant DS_DEFAULT_CONTEXT can be passed as the value of the DS_C_CONTEXT parameter to the interface functions, and it has the same effect as a context OM object created with default values. The context must be a private object, unless it is DS_DEFAULT_CONTEXT.

(See XDS Class Definitions for detailed specifications of the OM class DS_C_CONTEXT.)