Enhancement #156

Refactor LDAPAbstractDAI to eliminate hardcoded use of LDAPErrorHandler

Added by Marcel Huber about 13 years ago. Updated over 7 years ago.

Status:NewStart date:2010-03-23
Priority:HighDue date:
Assignee:-% Done:


Target version:-


A more flexible way should be established to handle info/warning/error codes.
As this is in most cases the problem domain of the surrounding application, ResultMappers would probably be a better solution.

bool LDAPAbstractDAI::Exec( Context &ctx, ParameterMapper *getter, ResultMapper *putter)
    Trace("Executing LDAP data access: " << fName);
    LDAPErrorHandler eh(ctx, getter, putter, fName);

    bool ret( false );
    if ( (ret = DoExec(ctx, getter, putter, eh)) == true ) {
        // LDAP transaction completed successfully
        return ret;
    if ( eh.GetRetryState() == LDAPErrorHandler::eRetry ) {
        Trace("Will try a rebind (LDAP might have been restarted.) for DataAccess: " << fName);
        eh.HandleSessionError((LDAP *) NULL, "Will try a rebind (LDAP might have been restarted.)");
        return DoExec(ctx, getter, putter, eh);
    return ret;


#1 Updated by Michael Rüegg over 12 years ago

  • Priority changed from Normal to High

#2 Updated by Marcel Huber over 7 years ago

  • Project changed from Webdisplay2Coast to COAST
  • Description updated (diff)
  • Category changed from framework code to framework
  • % Done changed from 0 to 10

There is no final solution yet but at least unwanted error codes can be suppressed from being logged. This was introduced in commit 152eb6ab
Examples can be found in the tests: source:coast/modules/LDAP/Test/config/InputMapperMeta.any#L127

Also available in: Atom PDF